fix serializer response
This commit is contained in:
parent
2cb87ebb90
commit
f6a4745dfd
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from suitablephones.models import Bluetooth, Camera, Device
|
from suitablephones.models import Bluetooth, Camera, Device, Screen
|
||||||
|
|
||||||
|
|
||||||
class CameraSerializer(serializers.ModelSerializer):
|
class CameraSerializer(serializers.ModelSerializer):
|
||||||
|
@ -22,6 +22,7 @@ class ScreenSerializer(serializers.ModelSerializer):
|
||||||
class DeviceSerializer(serializers.ModelSerializer):
|
class DeviceSerializer(serializers.ModelSerializer):
|
||||||
bluetooth = BluetoothSerializer(many=False, read_only=True)
|
bluetooth = BluetoothSerializer(many=False, read_only=True)
|
||||||
cameras = CameraSerializer(many=True, read_only=True)
|
cameras = CameraSerializer(many=True, read_only=True)
|
||||||
|
screen = ScreenSerializer(many=True, read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Device
|
model = Device
|
||||||
|
|
Loading…
Reference in a new issue