From d3b832f45a60d773c4f06cd783d9b425851d634f Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 22 May 2024 19:56:23 +0200 Subject: [PATCH] stash --- core/notifications/migrations/0001_initial.py | 9 ++++++--- core/notifications/models.py | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/notifications/migrations/0001_initial.py b/core/notifications/migrations/0001_initial.py index 7580f03..4d276eb 100644 --- a/core/notifications/migrations/0001_initial.py +++ b/core/notifications/migrations/0001_initial.py @@ -16,9 +16,11 @@ class Migration(migrations.Migration): ] def create_required_templates(apps, schema_editor): - MessageTemplate.objects.create(name='auto_reply', message=auto_reply_body) - MessageTemplate.objects.create(name='new_issue_notification', message=new_issue_notification) - MessageTemplate.objects.create(name='reply_issue_notification', message=reply_issue_notification) + MessageTemplate.objects.create(name='auto_reply', message=auto_reply_body, marked_required=True) + MessageTemplate.objects.create(name='new_issue_notification', message=new_issue_notification, + marked_required=True) + MessageTemplate.objects.create(name='reply_issue_notification', message=reply_issue_notification, + marked_required=True) operations = [ migrations.CreateModel( @@ -29,6 +31,7 @@ class Migration(migrations.Migration): ('message', models.TextField()), ('created', models.DateTimeField(auto_now_add=True)), ('marked_confidential', models.BooleanField(default=False)), + ('marked_required', models.BooleanField(default=False)), ], ), migrations.CreateModel( diff --git a/core/notifications/models.py b/core/notifications/models.py index caeab7a..9cbfbe5 100644 --- a/core/notifications/models.py +++ b/core/notifications/models.py @@ -8,6 +8,7 @@ class MessageTemplate(models.Model): message = models.TextField() created = models.DateTimeField(auto_now_add=True) marked_confidential = models.BooleanField(default=False) + marked_required = models.BooleanField(default=False) # may not be deleted def __str__(self): return self.name