From d865997daf6709d500282963925aff08d1272fea Mon Sep 17 00:00:00 2001 From: Betul Karagoz Date: Tue, 13 Aug 2024 18:28:35 +0200 Subject: [PATCH] fix logged user error --- AdminManagement/views/case/adminCaseDetailController.py | 2 -- AdminManagement/views/case/adminCasesController.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/AdminManagement/views/case/adminCaseDetailController.py b/AdminManagement/views/case/adminCaseDetailController.py index 1959ed9..0dfa6c3 100755 --- a/AdminManagement/views/case/adminCaseDetailController.py +++ b/AdminManagement/views/case/adminCaseDetailController.py @@ -24,8 +24,6 @@ # Create your views here. @api_view(["GET", "PATCH", "DELETE"]) def adminCaseDetailController(request, id, **kwargs): - # loggedUser detected in UNHCR_Backend.middlewares.authMiddleware - user = kwargs["loggedUser"] try: case = Case.objects.get(ID=id) except Case.DoesNotExist as err: diff --git a/AdminManagement/views/case/adminCasesController.py b/AdminManagement/views/case/adminCasesController.py index 6300a45..bcd8ab9 100755 --- a/AdminManagement/views/case/adminCasesController.py +++ b/AdminManagement/views/case/adminCasesController.py @@ -27,9 +27,6 @@ # Create your views here. @api_view(["GET", "POST"]) def adminCasesController(request, **kwargs): - # loggedUser detected in UNHCR_Backend.middlewares.authMiddleware - user = kwargs["loggedUser"] - if request.method == "GET": """ Lists all cases of the logged in user.