mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
boolean logic performed on filter results
* Before, the boolean logic operators were performed against the Q() objects, iteratively. Now, boolean logic is done after Host.objects.filter(Q()). This results in the wanted and expected results.
This commit is contained in:
@@ -1827,8 +1827,8 @@ class HostList(ListCreateAPIView):
|
||||
qs = super(HostList, self).get_queryset()
|
||||
filter_string = self.request.query_params.get('host_filter', None)
|
||||
if filter_string:
|
||||
filter_q = DynamicFilter.query_from_string(filter_string)
|
||||
qs = qs.filter(filter_q)
|
||||
filter_qs = DynamicFilter.query_from_string(filter_string)
|
||||
qs &= filter_qs
|
||||
return qs
|
||||
|
||||
def list(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user