From 23972e962903b2f7aa8f1859925993f71838bc05 Mon Sep 17 00:00:00 2001 From: bsilkyn Date: Thu, 2 May 2024 14:16:29 +0200 Subject: [PATCH] chore: backend lint fix --- backend/api/views/user_view.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/api/views/user_view.py b/backend/api/views/user_view.py index f21f56ba..b41c6437 100644 --- a/backend/api/views/user_view.py +++ b/backend/api/views/user_view.py @@ -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", "") @@ -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