Skip to content
Snippets Groups Projects
Verified Commit 9b6c7e57 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Merge branch 'kmohrf/program-endpoint' of...

Merge branch 'kmohrf/program-endpoint' of ssh://gitlab.servus.at:22022/aura/steering into kmohrf/program-endpoint
parents 1ad92428 435f2f8d
No related branches found
No related tags found
1 merge request!52new program endpoint
Pipeline #8322 passed
......@@ -699,3 +699,9 @@ class ProgramEntry:
end: datetime.datetime
show: Show
timeslot: TimeSlot | None
def playlist_id(self) -> int | None:
if self.timeslot and self.timeslot.playlist_id:
return self.timeslot.playlist_id
else:
return self.show.default_playlist_id
......@@ -1293,6 +1293,7 @@ class BasicProgramEntrySerializer(serializers.Serializer):
start = serializers.DateTimeField()
end = serializers.DateTimeField()
timeslot_id = serializers.IntegerField(allow_null=True, source="timeslot.id")
playlist_id = serializers.IntegerField(allow_null=True)
show_id = serializers.IntegerField(source="show.id")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment