mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
Removed all encompassing .distinct() call for all views
This .distinct() call applied .distinct() to all list query sets. Most query sets are already unique, and adding .distinct causes the database to do a lot of extra work. Views that rely on this behavior will be rooted out during the hardening sprint and .distinct() will be added to the individual querysets as needed instead of applying this everywhere.
This commit is contained in:
parent
8f9fe93de5
commit
44a8da83c2
@ -218,7 +218,7 @@ class FieldLookupBackend(BaseFilterBackend):
|
||||
q = Q(**{k:v})
|
||||
queryset = queryset.filter(q)
|
||||
queryset = queryset.filter(*args)
|
||||
return queryset.distinct()
|
||||
return queryset
|
||||
except (FieldError, FieldDoesNotExist, ValueError), e:
|
||||
raise ParseError(e.args[0])
|
||||
except ValidationError, e:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user