Skip to content

Commit

Permalink
api.schedule: c3voc webhook should not overwrite existing youtube urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Aug 31, 2024
1 parent 2d4406d commit 57c4183
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/api/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@ def post(self):
proposal.c3voc_url = ""

if payload["youtube"]["enabled"] and payload["youtube"]["urls"]:
# c3voc will send us a list, even though we only have one
# video.
proposal.youtube_url = payload["youtube"]["urls"][0]
proposal.video_recording_lost = False
# only update the youtube url if we don't currently have one
# stored.
if not not proposal.youtube_url:
# c3voc will send us a list, even though we only have one
# video.
proposal.youtube_url = payload["youtube"]["urls"][0]
proposal.video_recording_lost = False
else:
proposal.youtube_url = ""

Expand Down

0 comments on commit 57c4183

Please sign in to comment.