diff --git a/apps/authentication/api/v1/api.py b/apps/authentication/api/v1/api.py index 94fdee9..1884ba0 100644 --- a/apps/authentication/api/v1/api.py +++ b/apps/authentication/api/v1/api.py @@ -313,9 +313,9 @@ class OrganizationViewSet(BaseViewSet, SoftDeleteMixin, ModelViewSet, DynamicSea """ list of organizations by province """ if 'province' in request.GET.keys(): - queryset = self.queryset.filter(province=int(request.GET['province'])) + queryset = self.get_queryset().filter(province=int(request.GET['province'])) else: - queryset = self.queryset.filter(province=request.user.province) + queryset = self.get_queryset().filter(province=request.user.province) if 'exclude' in request.GET.keys(): queryset = queryset.exclude(type__key=request.GET['exclude']) diff --git a/logs/django_requests.log b/logs/django_requests.log index 988e9b5..8d3f84a 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -303,3 +303,5 @@ django.core.exceptions.FieldError: Unsupported lookup 'name' for ForeignKey or j [2025-10-28 09:48:08,454] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading. [2025-10-28 09:48:11,301] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader [2025-10-28 09:51:26,296] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\services\role_child.py changed, reloading. +[2025-10-28 09:51:28,557] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-10-28 09:58:41,881] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.