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

refactor: remove code for nested routes

parent 0c202527
No related branches found
No related tags found
No related merge requests found
Pipeline #7767 failed
......@@ -999,12 +999,6 @@ class NoteSerializer(serializers.ModelSerializer):
links_data = validated_data.pop("links", [])
# required
# TODO: Once we remove nested routes, this hack should be removed
if "timeslot" not in validated_data:
timeslot_pk = TimeSlot.objects.get(pk=self.context["request"].path.split("/")[-3])
validated_data["timeslot"] = validated_data.pop("timeslot", timeslot_pk)
show = validated_data["timeslot"].schedule.show
user = self.context.get("request").user
user_is_owner = user in show.owners.all()
......
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