From a0397fdcf44947effa6f8e3913f16bc208b496d2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 30 May 2022 21:32:48 +0200 Subject: [PATCH] events: set default transport mode Signed-off-by: Jens Langhammer --- .../events/migrations/0002_alter_notificationtransport_mode.py | 3 ++- authentik/events/models.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/authentik/events/migrations/0002_alter_notificationtransport_mode.py b/authentik/events/migrations/0002_alter_notificationtransport_mode.py index 119586088..44c60ae76 100644 --- a/authentik/events/migrations/0002_alter_notificationtransport_mode.py +++ b/authentik/events/migrations/0002_alter_notificationtransport_mode.py @@ -42,7 +42,8 @@ class Migration(migrations.Migration): ("webhook", "Generic Webhook"), ("webhook_slack", "Slack Webhook (Slack/Discord)"), ("email", "Email"), - ] + ], + default="local", ), ), migrations.RunPython(notify_local_transport), diff --git a/authentik/events/models.py b/authentik/events/models.py index 37735c6cd..2c77ee129 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -301,7 +301,7 @@ class NotificationTransport(models.Model): uuid = models.UUIDField(primary_key=True, editable=False, default=uuid4) name = models.TextField(unique=True) - mode = models.TextField(choices=TransportMode.choices) + mode = models.TextField(choices=TransportMode.choices, default=TransportMode.LOCAL) webhook_url = models.TextField(blank=True, validators=[DomainlessURLValidator()]) webhook_mapping = models.ForeignKey(