From 4b3286f12d22fd0d01f448e23b173aa66fe0e5d0 Mon Sep 17 00:00:00 2001 From: moanos Date: Fri, 11 Jul 2025 17:51:39 +0200 Subject: [PATCH] fix: revert allowing an empty user to notify --- .../0053_alter_notification_adoption_notice_and_more.py | 2 +- src/fellchensammlung/models.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fellchensammlung/migrations/0053_alter_notification_adoption_notice_and_more.py b/src/fellchensammlung/migrations/0053_alter_notification_adoption_notice_and_more.py index 6534fcc..5d8b11f 100644 --- a/src/fellchensammlung/migrations/0053_alter_notification_adoption_notice_and_more.py +++ b/src/fellchensammlung/migrations/0053_alter_notification_adoption_notice_and_more.py @@ -35,6 +35,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='notification', name='user_to_notify', - field=models.ForeignKey(blank=True, help_text='Useraccount der Benachrichtigt wird', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL, verbose_name='Nutzer*in'), + field=models.ForeignKey(help_text='Useraccount der Benachrichtigt wird', on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL, verbose_name='Nutzer*in'), ), ] diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index b2d60b0..7fdf9da 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -927,7 +927,6 @@ class Notification(models.Model): text = models.TextField(verbose_name="Inhalt") user_to_notify = models.ForeignKey(User, on_delete=models.CASCADE, - blank=True, null=True, verbose_name=_('Nutzer*in'), help_text=_("Useraccount der Benachrichtigt wird"), related_name='user')