fix - mydevices

This commit is contained in:
2025-11-03 10:25:31 +03:30
parent 5ce107fd3a
commit d8f5f6a22a
3 changed files with 26 additions and 2 deletions

View File

@@ -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',
),
]

View File

@@ -103,10 +103,9 @@ class DeviceViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, AdminFi
) if organization.free_visibility_by_scope else self.get_queryset()
queryset = apply_visibility_filter_by_org_type(devices, organization)
print(queryset)
# paginate devices
page = self.paginate_queryset(devices)
page = self.paginate_queryset(queryset)
if page is not None: # noqa
serializer = self.get_serializer(page, many=True)
return self.get_paginated_response(serializer.data)

View File

@@ -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: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: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