organization & userrelations free visibility

This commit is contained in:
2025-11-02 11:54:17 +03:30
parent b2e599db91
commit 4d0288debc
3 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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