fix - mydevices
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 5.0 on 2025-11-03 06:50
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('pos_device', '0076_device_city_device_province'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='device',
|
||||||
|
name='city',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='device',
|
||||||
|
name='province',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -103,10 +103,9 @@ class DeviceViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, AdminFi
|
|||||||
) if organization.free_visibility_by_scope else self.get_queryset()
|
) if organization.free_visibility_by_scope else self.get_queryset()
|
||||||
|
|
||||||
queryset = apply_visibility_filter_by_org_type(devices, organization)
|
queryset = apply_visibility_filter_by_org_type(devices, organization)
|
||||||
print(queryset)
|
|
||||||
|
|
||||||
# paginate devices
|
# paginate devices
|
||||||
page = self.paginate_queryset(devices)
|
page = self.paginate_queryset(queryset)
|
||||||
if page is not None: # noqa
|
if page is not None: # noqa
|
||||||
serializer = self.get_serializer(page, many=True)
|
serializer = self.get_serializer(page, many=True)
|
||||||
return self.get_paginated_response(serializer.data)
|
return self.get_paginated_response(serializer.data)
|
||||||
|
|||||||
@@ -772,3 +772,7 @@ AssertionError: .validate() should return the validated data
|
|||||||
[2025-11-03 10:08:23,644] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
|
[2025-11-03 10:08:23,644] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
|
||||||
[2025-11-03 10:08:25,957] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
[2025-11-03 10:08:25,957] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
[2025-11-03 10:16:18,352] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\pos_device\models.py changed, reloading.
|
[2025-11-03 10:16:18,352] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\pos_device\models.py changed, reloading.
|
||||||
|
[2025-11-03 10:16:23,953] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
|
[2025-11-03 10:20:41,743] INFO django.server | IP: - | Path: - | "GET /pos_device/web/v1/pos/device/my_devices/ HTTP/1.1" 200 5059
|
||||||
|
[2025-11-03 10:22:41,485] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\pos_device\web\api\v1\viewsets\device.py changed, reloading.
|
||||||
|
[2025-11-03 10:22:44,140] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
|
|||||||
Reference in New Issue
Block a user