Skip to content

Commit

Permalink
Merge pull request #306 from gwynndp/capture-add-distinct
Browse files Browse the repository at this point in the history
Make results of captures query distinct to avoid duplicates
  • Loading branch information
Kpoke authored Apr 25, 2023
2 parents fe2003b + 7d99679 commit 38921a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/infra/database/CaptureRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ export default class CaptureRepository extends BaseRepository<Capture> {
`,
),
)
.where((builder) => this.filterWhereBuilder(filter, builder));
.where((builder) => this.filterWhereBuilder(filter, builder))
.distinct();

promise = promise.orderBy(
sort?.order_by || 'treetracker.capture.created_at',
Expand Down

0 comments on commit 38921a8

Please sign in to comment.