Skip do_not_record proposals when uploading videos to YouTube - #4809
Merged
Conversation
The "Upload videos to YouTube" admin action queued every schedule item with a video file, including talks whose speakers asked not to be recorded.
Contributor
|
Reviewed. The fix (adding No issues found. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
Upload videos to YouTubeadmin action queued every schedule item that had a video file and no YouTube ID, ignoringSubmission.do_not_record. On PyCon Italia 2026 this uploaded 4 talks whose speakers had opted out of recording (schedule items 1083, 1160, 1161, 1176), and drafted the "video recording uploaded" email to those speakers.This adds
.exclude(submission__do_not_record=True)to the action's queryset. Items without a submission (custom items) are unaffected, since theexcludeon the join doesn't matchNULL.Test:
test_upload_videos_to_youtube_skips_do_not_record_submissions.Notes
upload_schedule_item_video/process_schedule_items_videos_to_uploadstill process anyScheduleItemSentForVideoUploadrows that already exist, so previously queued do-not-record items are not stopped by this change.ScheduleItemFactory.typeis stillFuzzyChoice(["submission", "custom"])even though thesubmissiontype was removed. When it rollscustomthe factory drops thesubmissionpassed in, which makes tests randomly flaky.ToDo
do_not_record