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

fix: get the showId from the schedule in the request

parent c2890b57
No related branches found
No related tags found
No related merge requests found
......@@ -558,6 +558,9 @@ class APIScheduleViewSet(
pk, show_pk = get_values(self.kwargs, "pk", "show_pk")
if show_pk is None:
show_pk = request.data.get("schedule").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.
Please register or to comment