list of devices by admin filter mixin

This commit is contained in:
2025-08-11 12:16:02 +03:30
parent 588e97ae2d
commit e78d983813
3 changed files with 22 additions and 5 deletions

View File

@@ -17,7 +17,10 @@ class DeviceSerializer(ModelSerializer):
""" custom output of serializer """
representation = super().to_representation(instance)
representation['organization'] = {'name': instance.organization.name}
representation['organization'] = {
'name': instance.organization.name,
'id': instance.organization.id
}
return representation