mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
Merge pull request #5749 from ryanpetrello/search-distinct
fix a bug that causes __search filters to not properly call .distinct() Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user