Fix ticket search, when there are multiple custom fields

This commit is contained in:
Igor Mikeshin 2019-11-22 15:06:15 +08:00
parent 6d538da0f0
commit 407c00addd

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: