From 80fc934d40062a4ed943abdbba214331fe458ef8 Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Fri, 16 Feb 2024 13:03:35 -0400 Subject: [PATCH] fix: try to get the showId directly if the nested is 0 --- program/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/program/views.py b/program/views.py index 5e8868c4..d7af879f 100644 --- a/program/views.py +++ b/program/views.py @@ -567,6 +567,10 @@ class APIScheduleViewSet( if show_pk is None: show_pk = request.data.get("schedule").get("show_id") + # FIXME: this is wrong + if show_pk == 0: + show_pk = request.data.get("show_id") + # Only allow creating when calling /shows/{show_pk}/schedules/ and with ehe `schedule` JSON # object if show_pk is None or "schedule" not in request.data: -- GitLab