fix - transaction & show users with my organization except me
This commit is contained in:
@@ -38,7 +38,8 @@ class BaseViewSet(RegionFilterMixin, viewsets.ModelViewSet):
|
||||
if model_name == 'userrelations': # noqa
|
||||
# add all users with my organization except my user
|
||||
child_orgs.append(org)
|
||||
queryset = (queryset.filter(organization__in=child_orgs).exclude(user=user))
|
||||
child_roles = get_all_role_child(user_relation.role)
|
||||
queryset = (queryset.filter(organization__in=child_orgs, role__in=child_roles).exclude(user=user))
|
||||
|
||||
elif model_name == 'organization':
|
||||
queryset = queryset.filter(id__in=[org.id for org in child_orgs])
|
||||
|
||||
@@ -631,3 +631,5 @@ AssertionError: .validate() should return the validated data
|
||||
[2025-11-01 13:57:55,398] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\warehouse\web\api\v1\api.py changed, reloading.
|
||||
[2025-11-01 13:58:02,091] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||
[2025-11-01 14:19:59,373] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
|
||||
[2025-11-01 14:20:01,908] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||
[2025-11-01 14:34:29,660] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
|
||||
|
||||
Reference in New Issue
Block a user