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

feat: remove redundant code

parent 07dce848
No related branches found
No related tags found
No related merge requests found
...@@ -1118,22 +1118,6 @@ class APIScheduleViewSet(viewsets.ModelViewSet): ...@@ -1118,22 +1118,6 @@ class APIScheduleViewSet(viewsets.ModelViewSet):
schedule = self.get_object() schedule = self.get_object()
# FIXME: this is redundant now and should be removed
# If default playlist id or repetition are given, just update
if default_playlist_id := request.data.get("schedule").get("default_playlist_id"):
schedule.default_playlist_id = int(default_playlist_id)
schedule.save()
serializer = ScheduleSerializer(schedule)
return Response(serializer.data)
if is_repetition := request.data.get("schedule").get("is_repetition"):
schedule.is_repetition = bool(is_repetition)
schedule.save()
serializer = ScheduleSerializer(schedule)
return Response(serializer.data)
try: try:
resolution = resolve_conflicts(request.data, schedule.pk, schedule.show.pk) resolution = resolve_conflicts(request.data, schedule.pk, schedule.show.pk)
except ScheduleConflictError as exc: except ScheduleConflictError as exc:
......
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