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()
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user