mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 05:52:15 +00:00
Fix logic of filtering secure API requests
This commit is contained in:
@@ -101,11 +101,13 @@ class SecureAPIRequest(generic.View):
|
||||
for field in fields:
|
||||
q = Q(**{field + "__icontains": part})
|
||||
qs.append(q)
|
||||
for filter in filters:
|
||||
q = Q(**{field: True})
|
||||
qs.append(q)
|
||||
|
||||
queries.append(reduce(operator.or_, qs))
|
||||
|
||||
for f in filters:
|
||||
q = Q(**{f: True})
|
||||
queries.append(q)
|
||||
|
||||
# Build the data response list
|
||||
results = []
|
||||
query = reduce(operator.and_, queries)
|
||||
|
||||
Reference in New Issue
Block a user