We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c47bcd7 commit e73ac96Copy full SHA for e73ac96
roundware/api2/serializers.py
@@ -350,7 +350,8 @@ class Meta:
350
351
def get_children(self, obj):
352
# Access the reverse relationship via `children`
353
- return [child.id for child in obj.children.all()] # Return IDs of children
+ return obj.children.values_list('id', flat=True) # Return IDs of children
354
+
355
356
def to_representation(self, obj):
357
result = super(SpeakerSerializer, self).to_representation(obj)
0 commit comments