From 106545d4fead917a42c051a108990a56f6a1c016 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 31 Aug 2024 15:11:35 +0200 Subject: [PATCH] api.schedule: c3voc webhook should not overwrite existing youtube urls --- apps/api/schedule.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/api/schedule.py b/apps/api/schedule.py index e99faaeb0..27d0d33ed 100644 --- a/apps/api/schedule.py +++ b/apps/api/schedule.py @@ -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 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 = ""