fix-my devices - import new mixin of visible orgs
This commit is contained in:
@@ -99,7 +99,9 @@ class DeviceViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, AdminFi
|
|||||||
# using admin filter mixin to get query
|
# using admin filter mixin to get query
|
||||||
devices = self.get_query(self.get_queryset(
|
devices = self.get_query(self.get_queryset(
|
||||||
visibility_by_org_scope=True
|
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
|
# paginate devices
|
||||||
page = self.paginate_queryset(devices)
|
page = self.paginate_queryset(devices)
|
||||||
|
|||||||
@@ -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: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 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: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.
|
||||||
|
|||||||
Reference in New Issue
Block a user