From f6a4745dfd4d96441dc0d31920c1f4fe3ca3702d Mon Sep 17 00:00:00 2001 From: d0c Date: Fri, 17 Feb 2023 14:50:26 +0100 Subject: [PATCH] fix serializer response --- suitablephones/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suitablephones/serializers.py b/suitablephones/serializers.py index 53ba572..8007ef7 100644 --- a/suitablephones/serializers.py +++ b/suitablephones/serializers.py @@ -1,6 +1,6 @@ from rest_framework import serializers -from suitablephones.models import Bluetooth, Camera, Device +from suitablephones.models import Bluetooth, Camera, Device, Screen class CameraSerializer(serializers.ModelSerializer): @@ -22,6 +22,7 @@ class ScreenSerializer(serializers.ModelSerializer): class DeviceSerializer(serializers.ModelSerializer): bluetooth = BluetoothSerializer(many=False, read_only=True) cameras = CameraSerializer(many=True, read_only=True) + screen = ScreenSerializer(many=True, read_only=True) class Meta: model = Device