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

fix: try to get the showId directly if the nested is 0

parent c1537aa6
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
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