From cfe2648b62c946b45d7bf170628d42e4dc1d6d6f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 22 May 2022 19:32:58 +0200 Subject: [PATCH] events: fix transport not allowing blank values Signed-off-by: Jens Langhammer --- ...001_squashed_0019_alter_notificationtransport_webhook_url.py | 1 + authentik/events/models.py | 1 + schema.yml | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/events/migrations/0001_squashed_0019_alter_notificationtransport_webhook_url.py b/authentik/events/migrations/0001_squashed_0019_alter_notificationtransport_webhook_url.py index 874939c48..3f8897e7c 100644 --- a/authentik/events/migrations/0001_squashed_0019_alter_notificationtransport_webhook_url.py +++ b/authentik/events/migrations/0001_squashed_0019_alter_notificationtransport_webhook_url.py @@ -383,6 +383,7 @@ class Migration(migrations.Migration): models.ManyToManyField( help_text="Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI.", to="authentik_events.NotificationTransport", + blank=True, ), ), ], diff --git a/authentik/events/models.py b/authentik/events/models.py index cd0e94f73..a09268898 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -481,6 +481,7 @@ class NotificationRule(PolicyBindingModel): "selected, the notification will only be shown in the authentik UI." ) ), + blank=True, ) severity = models.TextField( choices=NotificationSeverity.choices, diff --git a/schema.yml b/schema.yml index f5f4c34b3..332a309a8 100644 --- a/schema.yml +++ b/schema.yml @@ -22969,7 +22969,6 @@ components: - group_obj - name - pk - - transports NotificationRuleRequest: type: object description: NotificationRule Serializer @@ -22998,7 +22997,6 @@ components: and shown to. If left empty, Notification won't ben sent. required: - name - - transports NotificationTransport: type: object description: NotificationTransport Serializer