fix - add if state to free visibility in get_queryset()

This commit is contained in:
2025-11-02 12:02:13 +03:30
parent 4d0288debc
commit 466a979587
2 changed files with 2 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ class BaseViewSet(RegionFilterMixin, viewsets.ModelViewSet):
if self.request.method.lower() == 'get' and not self.kwargs.get('pk'):
queryset = self.filter_by_region(queryset, org=True)
if visibility_by_org_scope:
if visibility_by_org_scope and org.free_visibility_by_scope:
""" if organization has free visibility by scope, apply visibility filter """
queryset = apply_visibility_filter(queryset, org)
return queryset

View File

@@ -671,3 +671,4 @@ AssertionError: .validate() should return the validated data
[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
[2025-11-02 12:01:41,047] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.