Skip to content

Commit

Permalink
Merge pull request #787 from mozggg/custom-fields-search-fix
Browse files Browse the repository at this point in the history
Fix ticket search, when there are multiple custom fields
  • Loading branch information
gwasser committed Nov 22, 2019
2 parents 6d538da + 407c00a commit 7c89285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpdesk/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def apply_query(queryset, params):
Q(ticketcustomfieldvalue__value__icontains=search)
)

queryset = queryset.filter(qset)
# Distinct works, when there are multiple custom fields
queryset = queryset.filter(qset).distinct()

sorting = params.get('sorting', None)
if sorting:
Expand Down

0 comments on commit 7c89285

Please sign in to comment.