forked from CGM_Public/pretix_original
Event creation: call plugin installed() after persisting event (#2133)
With #2089, PluginConfig.installed() is also called for newly created events. However, the passed event argument is still not committed. The plugins cannot use the event to insert or select objects, as it does not have an ID yet.
This commit is contained in:
@@ -262,10 +262,10 @@ class EventWizard(SafeSessionWizardView):
|
||||
with transaction.atomic(), language(basics_data['locale']):
|
||||
event = form_dict['basics'].instance
|
||||
event.organizer = foundation_data['organizer']
|
||||
event.set_active_plugins(settings.PRETIX_PLUGINS_DEFAULT.split(","), allow_restricted=True)
|
||||
event.has_subevents = foundation_data['has_subevents']
|
||||
event.testmode = True
|
||||
form_dict['basics'].save()
|
||||
event.set_active_plugins(settings.PRETIX_PLUGINS_DEFAULT.split(","), allow_restricted=True)
|
||||
event.log_action(
|
||||
'pretix.event.added',
|
||||
user=self.request.user,
|
||||
|
||||
Reference in New Issue
Block a user