diff --git a/apps/pos_device/web/api/v1/viewsets/device.py b/apps/pos_device/web/api/v1/viewsets/device.py index 4f14ff4..9de8244 100644 --- a/apps/pos_device/web/api/v1/viewsets/device.py +++ b/apps/pos_device/web/api/v1/viewsets/device.py @@ -99,7 +99,9 @@ class DeviceViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, AdminFi # using admin filter mixin to get query devices = self.get_query(self.get_queryset( visibility_by_org_scope=True - ) if organization.free_visibility_by_scope else self.get_queryset()) + ) if organization.free_visibility_by_scope else self.get_queryset().filter( + organization=organization + )) # paginate devices page = self.paginate_queryset(devices) diff --git a/logs/django_requests.log b/logs/django_requests.log index 4ad509a..522adc4 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -694,3 +694,5 @@ AssertionError: .validate() should return the validated data [2025-11-02 16:38:11,296] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\product\web\api\v1\viewsets\product_api.py changed, reloading. [2025-11-02 16:38:16,320] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader [2025-11-02 17:05:50,482] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\pos_device\web\api\v1\viewsets\device.py changed, reloading. +[2025-11-02 17:05:54,363] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-02 17:10:53,634] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\pos_device\web\api\v1\viewsets\device.py changed, reloading.