feat: admin gallery - lightbox with icons, filters by date/event/status; fix: event badges - only current slug shows En cours; fix: archive_all_open on new event; fix: mtime_index uses stem for event photo filter
This commit is contained in:
@@ -63,9 +63,9 @@ async def update_event(request: Request, payload: EventUpdate):
|
||||
|
||||
old_slug = cfg.event.slug
|
||||
|
||||
if payload.new_event and old_slug and old_slug != new_slug:
|
||||
# Archive l'ancien événement
|
||||
await event_svc.archive_event(old_slug)
|
||||
if payload.new_event:
|
||||
# Archive TOUS les événements encore ouverts (ended_at IS NULL)
|
||||
await event_svc.archive_all_open()
|
||||
|
||||
# Crée ou met à jour la ligne dans la DB
|
||||
await event_svc.ensure_event(new_slug, payload.name, now if payload.new_event else cfg.event.started_at or now)
|
||||
|
||||
Reference in New Issue
Block a user