From 2facc9a07b64d3e82812f3b29ac0d85e21aa33c7 Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Fri, 9 Jun 2023 11:43:52 -0400 Subject: [PATCH] fix: return null instead of "" Closes #152 --- program/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/views.py b/program/views.py index 407911e7..f349fe1d 100644 --- a/program/views.py +++ b/program/views.py @@ -106,7 +106,7 @@ def timeslot_entry(*, timeslot: TimeSlot) -> dict: "id": timeslot.id, "playlistId": playlist_id, # `Timeslot.repetition_of` is a foreign key that can be null - "repetitionOfId": timeslot.repetition_of.id if timeslot.repetition_of else "", + "repetitionOfId": timeslot.repetition_of.id if timeslot.repetition_of else None, "scheduleDefaultPlaylistId": schedule.default_playlist_id, "scheduleId": schedule.id, "showCategories": ", ".join(show.category.values_list("name", flat=True)), -- GitLab