diff --git a/apps/core/api.py b/apps/core/api.py index 31d407e..605d15a 100644 --- a/apps/core/api.py +++ b/apps/core/api.py @@ -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 diff --git a/logs/django_requests.log b/logs/django_requests.log index 8e719fb..8f91376 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -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.