Compare commits

...
2 changed files with 8 additions and 5 deletions
+5 -4
View File
@@ -172,10 +172,11 @@ def send_notification_mail(notification: Notification, user: User):
guid = uuid.uuid4()
settings_holder = notification.event or notification.organizer
prefix = settings_holder.settings.mail_prefix
if not prefix and notification.event:
prefix = notification.event.slug.upper()
elif notification.organizer:
prefix = notification.organizer.name
if not prefix:
if notification.event:
prefix = notification.event.slug.upper()
elif notification.organizer:
prefix = notification.organizer.name
m = OutgoingMail.objects.create(
guid=guid,
user=user,
@@ -19,7 +19,9 @@ def activate_plugin(apps, schema_editor):
)
for event in events:
event.enable_plugin('pretix.plugins.sendmail')
plugins_active = event.plugins.split(',')
plugins_active.append('pretix.plugins.sendmail')
event.plugins = ','.join(plugins_active)
event.save(update_fields=['plugins'])