We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf44f6d commit 100aaaeCopy full SHA for 100aaae
sensorsafrica/api/v1/serializers.py
@@ -11,9 +11,13 @@
11
SensorDataSerializer as PostSensorDataSerializer
12
)
13
14
+class NodeLocationSerializer(NestedSensorLocationSerializer):
15
+ class Meta(NestedSensorLocationSerializer.Meta):
16
+ fields = NestedSensorLocationSerializer.Meta.fields + ("latitude", "longitude", "city")
17
+
18
class NodeSerializer(serializers.ModelSerializer):
19
sensors = NestedSensorSerializer(many=True)
- location = NestedSensorLocationSerializer()
20
+ location = NodeLocationSerializer()
21
22
class Meta:
23
model = Node
0 commit comments