fix(cms): guard default banner unset - #197
Merged
Merged
Conversation
damianrzepka
requested review from
jakubfilinger-b,
klaudia-blazyczek-blurify,
marek-chmielowski-blurify,
mp-blurify,
okapitula and
zaxovaiko
as code owners
September 18, 2026 11:16
jakubfilinger-b
requested changes
Sep 18, 2026
jakubfilinger-b
left a comment
Collaborator
There was a problem hiding this comment.
Blocker: an expired schedule can be revived after the default is cleared, so the end-date update path must preserve the fallback invariant.
jakubfilinger-b
approved these changes
Sep 19, 2026
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.
Summary
Prevents a placement default from being unset while an active or future banner schedule depends on it. Serializes the default-unset and schedule-create operations with the placement schedule lock.
Why
A concurrent schedule creation could otherwise succeed after the default had been removed, leaving the schedule without its fallback banner.
Alternatives considered
A client-side check cannot make this invariant safe because another administrator can change schedules after the check. The service-level transactional guard is the shared enforcement point.
Risks
The migration adds an index on schedule end time. Deploy migrations before application instances that use the guard.