From 3ce31c1f62f614e14c700ddca3389c8b8445f47c Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 6 Nov 2024 07:25:10 +0100 Subject: [PATCH] stash --- .../0006_alter_eventaddress_address.py | 18 ++++++++++++++++++ core/mail/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 core/mail/migrations/0006_alter_eventaddress_address.py diff --git a/core/mail/migrations/0006_alter_eventaddress_address.py b/core/mail/migrations/0006_alter_eventaddress_address.py new file mode 100644 index 0000000..5a03261 --- /dev/null +++ b/core/mail/migrations/0006_alter_eventaddress_address.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.7 on 2024-11-06 06:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mail', '0005_alter_eventaddress_event'), + ] + + operations = [ + migrations.AlterField( + model_name='eventaddress', + name='address', + field=models.CharField(max_length=255, unique=True), + ), + ] diff --git a/core/mail/models.py b/core/mail/models.py index 28524de..f8a3869 100644 --- a/core/mail/models.py +++ b/core/mail/models.py @@ -46,7 +46,7 @@ class Email(SoftDeleteModel): class EventAddress(models.Model): id = models.AutoField(primary_key=True) event = models.ForeignKey(Event, models.SET_NULL, null=True, related_name='addresses') - address = models.CharField(max_length=255) + address = models.CharField(max_length=255, unique=True) class EmailAttachment(AbstractFile):