Merge pull request #787 from mozggg/custom-fields-search-fix

Fix ticket search, when there are multiple custom fields
This commit is contained in:
Garret Wassermann 2019-11-22 02:28:29 -05:00 committed by GitHub
commit 7c89285a7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: