Add a hosts list serializer field for plays

This makes the plays return the list of hosts that they are
related to.

Change-Id: Ice0992a0237a59a37a974ebfb0c12879d4da41e7
This commit is contained in:
David Moreau Simard 2018-06-21 17:40:31 -04:00
parent c91ff18a8c
commit 068c6d8253
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC

View File

@ -166,6 +166,7 @@ class PlaySerializer(DurationSerializer):
model = models.Play model = models.Play
fields = '__all__' fields = '__all__'
hosts = HostSerializer(read_only=True, many=True)
results = ResultSerializer(read_only=True, many=True) results = ResultSerializer(read_only=True, many=True)