feat(events): series-level gathering and deadline offsets
EventSeries gains gathering_offset and deadline_offset (durations before the start). Each generated occurrence derives its gathering/deadline from them (and clears them when unset); propagate_series pushes offset changes to non-detached future occurrences. Surface them in the admin. 100% coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -45,8 +45,9 @@ def apply_template(series, event):
|
||||
event.title = series.title
|
||||
event.location = series.location
|
||||
event.opponent = series.opponent
|
||||
if series.duration is not None:
|
||||
event.end = event.start + series.duration
|
||||
event.end = event.start + series.duration if series.duration is not None else None
|
||||
event.gathering = event.start - series.gathering_offset if series.gathering_offset is not None else None
|
||||
event.deadline = event.start - series.deadline_offset if series.deadline_offset is not None else None
|
||||
event.save()
|
||||
|
||||
event.teams.set(series.teams.all())
|
||||
|
||||
Reference in New Issue
Block a user