diff --git a/apps/pos_device/migrations/0077_remove_device_city_remove_device_province.py b/apps/pos_device/migrations/0077_remove_device_city_remove_device_province.py new file mode 100644 index 0000000..a94b902 --- /dev/null +++ b/apps/pos_device/migrations/0077_remove_device_city_remove_device_province.py @@ -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', + ), + ] diff --git a/apps/pos_device/web/api/v1/viewsets/device.py b/apps/pos_device/web/api/v1/viewsets/device.py index 4ca3d3e..e48a533 100644 --- a/apps/pos_device/web/api/v1/viewsets/device.py +++ b/apps/pos_device/web/api/v1/viewsets/device.py @@ -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) diff --git a/logs/django_requests.log b/logs/django_requests.log index d5d0805..868bf3e 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -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