set to list of ids from org - BaseViewSet

This commit is contained in:
2025-10-27 16:27:11 +03:30
parent db97d0102a
commit 59029491cb
2 changed files with 3 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ class BaseViewSet(RegionFilterMixin, viewsets.ModelViewSet):
queryset = (queryset.filter(organization__in=child_orgs))
elif model_name == 'organization':
queryset = queryset.filter(id__in=child_orgs)
queryset = queryset.filter(id__in=[org.id for org in child_orgs])
return queryset

View File

@@ -35,3 +35,5 @@
[2025-10-27 16:15:30,229] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-27 16:15:32,562] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-27 16:22:54,143] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-27 16:22:56,067] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-27 16:26:54,114] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.