Skip to content

Commit

Permalink
chore: backend lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed May 2, 2024
1 parent 23ee483 commit 23972e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/api/views/user_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def patch_admin(self, request: Request, **_) -> Response:

return Response(status=HTTP_200_OK)

@action(detail=False, pagination_class=BasicPagination, permission_classes=[IsAdminUser|IsTeacher])
@action(detail=False, pagination_class=BasicPagination, permission_classes=[IsAdminUser | IsTeacher])
def search(self, request: Request) -> Response:
search = request.query_params.get("search", "")
identifier = request.query_params.get("id", "")
Expand All @@ -47,10 +47,10 @@ def search(self, request: Request) -> Response:
queryset = self.get_queryset().annotate(
full_name=Concat('first_name', Value(' '), 'last_name')
).filter(
Q(id__icontains=search) |
Q(username__icontains=search) |
Q(email__icontains=search) |
Q(full_name__icontains=search)
Q(id__icontains=search)
| Q(username__icontains=search)
| Q(email__icontains=search)
| Q(full_name__icontains=search)
)

# Filter the queryset based on selected roles
Expand Down

0 comments on commit 23972e9

Please sign in to comment.