diff --git a/apps/authentication/api/v1/api.py b/apps/authentication/api/v1/api.py index 8736f49..de0e8c3 100644 --- a/apps/authentication/api/v1/api.py +++ b/apps/authentication/api/v1/api.py @@ -256,7 +256,7 @@ class OrganizationViewSet(BaseViewSet, SoftDeleteMixin, ModelViewSet, DynamicSea def list(self, request, *args, **kwargs): """ all organization """ - queryset = self.get_queryset() + queryset = self.get_queryset(visibility_by_org_scope=True) query = self.filter_query(queryset) diff --git a/apps/authorization/api/v1/api.py b/apps/authorization/api/v1/api.py index 0b0d567..30fc60e 100644 --- a/apps/authorization/api/v1/api.py +++ b/apps/authorization/api/v1/api.py @@ -165,9 +165,9 @@ class UserRelationViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, D role_param = self.request.query_params.get('role') # noqa if role_param != '': - queryset = self.get_queryset().filter(role_id=int(role_param)) + queryset = self.get_queryset(visibility_by_org_scope=True).filter(role_id=int(role_param)) else: - queryset = self.get_queryset().order_by('-create_date') + queryset = self.get_queryset(visibility_by_org_scope=True).order_by('-create_date') queryset = self.filter_queryset(queryset) # noqa diff --git a/logs/django_requests.log b/logs/django_requests.log index 905c7d4..ff9878d 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -668,3 +668,6 @@ AssertionError: .validate() should return the validated data [2025-11-02 11:35:44,882] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\product\models.py changed, reloading. [2025-11-02 11:35:52,593] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader [2025-11-02 11:36:51,561] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\product\web\api\v1\viewsets\quota_api.py changed, reloading. +[2025-11-02 11:36:53,908] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-02 11:53:41,310] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading. +[2025-11-02 11:53:43,395] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader