diff --git a/program/views.py b/program/views.py index 520e6f27a23092281c273bcc6f2d829d00581a8f..8e60e1c29dca166274fc9ad3bfecd249711bfaaf 100644 --- a/program/views.py +++ b/program/views.py @@ -869,11 +869,11 @@ class APINoteViewSet( def _get_timeslot(self): # TODO: Once we remove nested routes, timeslot ownership # should be checked in a permission class. - timeslot_pk = self.request.data.get("timeslot", None) + timeslot_pk = self.request.data.get("timeslot_id", None) if timeslot_pk is None: timeslot_pk = get_values(self.kwargs, "timeslot_pk") if timeslot_pk is None: - raise ValidationError({"timeslot": [_("This field is required.")]}, code="required") + raise ValidationError({"timeslot_id": [_("This field is required.")]}, code="required") qs = TimeSlot.objects.all() if not self.request.user.is_superuser: qs = qs.filter(show__owners=self.request.user)