mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
fix a bug that causes __search filters to not properly call .distinct()
This commit is contained in:
parent
c35c80b06c
commit
256404ba03
@ -283,6 +283,9 @@ class FieldLookupBackend(BaseFilterBackend):
|
||||
search_value, new_keys, _ = self.value_to_python(queryset.model, key, force_text(value))
|
||||
assert isinstance(new_keys, list)
|
||||
search_filters[search_value] = new_keys
|
||||
# by definition, search *only* joins across relations,
|
||||
# so it _always_ needs a .distinct()
|
||||
needs_distinct = True
|
||||
continue
|
||||
|
||||
# Custom chain__ and or__ filters, mutually exclusive (both can
|
||||
|
Loading…
Reference in New Issue
Block a user