Skip to content

Commit

Permalink
fix: correct "or" filter for functions of user to an "and" filter #356
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed May 15, 2024
1 parent 7e2bdea commit 35ec65c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/views/user_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def search(self, request: Request) -> Response:
role_filters = Q()

for role in roles:
role_filters |= Q(**{f"{role}__isnull": False, f"{role}__is_active": True})
role_filters &= Q(**{f"{role}__isnull": False, f"{role}__is_active": True})

queryset = queryset.filter(
role_filters,
Expand Down

0 comments on commit 35ec65c

Please sign in to comment.