Scheduled exports: Fix missing event context, fix form initial

This commit is contained in:
Raphael Michel
2023-01-23 11:31:35 +01:00
parent fdc15a753c
commit 988188b00a
3 changed files with 19 additions and 0 deletions

View File

@@ -245,6 +245,7 @@ def _run_scheduled_export(schedule, context: Union[Event, Organizer], exporter,
subject=schedule.mail_subject,
template=LazyI18nString(schedule.mail_template),
context=get_email_context(event=context) if isinstance(context, Event) else {},
event=context if isinstance(context, Event) else None,
organizer=context.organizer if isinstance(context, Event) else context,
locale=schedule.locale,
attach_cached_files=[file],