From c870aec8ccabb8a7556426262f3c2f55800b08a8 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Tue, 28 Jun 2022 16:56:28 +0200 Subject: [PATCH] :sparkles: Add config option for recipients for failed notif emails --- ...ig_failed_notification_admin_recipients.py | 26 +++++++++++++++++++ vng_api_common/notifications/models.py | 10 +++++++ 2 files changed, 36 insertions(+) create mode 100644 vng_api_common/notifications/migrations/0011_notificationsconfig_failed_notification_admin_recipients.py diff --git a/vng_api_common/notifications/migrations/0011_notificationsconfig_failed_notification_admin_recipients.py b/vng_api_common/notifications/migrations/0011_notificationsconfig_failed_notification_admin_recipients.py new file mode 100644 index 00000000..d56c1d08 --- /dev/null +++ b/vng_api_common/notifications/migrations/0011_notificationsconfig_failed_notification_admin_recipients.py @@ -0,0 +1,26 @@ +# Generated by Django 3.2.13 on 2022-06-28 12:29 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("notifications", "0010_auto_20220627_1340"), + ] + + operations = [ + migrations.AddField( + model_name="notificationsconfig", + name="failed_notification_admin_recipients", + field=django.contrib.postgres.fields.ArrayField( + base_field=models.EmailField(max_length=254), + blank=True, + default=list, + help_text="Komma-gescheiden lijst van emailadressen die een email moeten ontvangen als het niet gelukt is om een notificatie te versturen (na de laatste retry).", + size=None, + verbose_name="failed notification email admin recipients", + ), + ), + ] diff --git a/vng_api_common/notifications/models.py b/vng_api_common/notifications/models.py index cc0eafc5..30a63285 100644 --- a/vng_api_common/notifications/models.py +++ b/vng_api_common/notifications/models.py @@ -33,6 +33,16 @@ class NotificationsConfig(ClientConfig): help_text=_("an upper limit to the exponential backoff time."), default=48, ) + failed_notification_admin_recipients = ArrayField( + models.EmailField(max_length=254), + verbose_name=_("failed notification email admin recipients"), + help_text=_( + "Komma-gescheiden lijst van emailadressen die een email moeten ontvangen " + "als het niet gelukt is om een notificatie te versturen (na de laatste retry)." + ), + default=list, + blank=True, + ) class Meta: verbose_name = _("Notificatiescomponentconfiguratie")