Skip to content

Commit

Permalink
api.schedule.ProposalC3VOCPublishingWebhook: fix logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Sep 1, 2024
1 parent 5cad172 commit 97ebe3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/api/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ def post(self):
if payload["youtube"]["enabled"]:
if payload["youtube"]["urls"]:
# Please do not overwrite existing youtube urls
youtube_url = payload["youtube"]["urls"][0]
if not youtube_url.startswith("https://www.youtube.com/watch"):
abort(406, message="youtube url must start with https://www.youtube.com/watch")
if not proposal.youtube_url:
youtube_url = payload["youtube"]["urls"][0]
if not youtube_url.startswith("https://www.youtube.com/watch"):
abort(406, message="youtube url must start with https://www.youtube.com/watch")
# c3voc will send us a list, even though we only have one
# video.
app.logger.info(f"C3VOC webhook set youtube_url for {proposal.id=} to {youtube_url}")
Expand Down

0 comments on commit 97ebe3a

Please sign in to comment.