Make mailinglist name unique in the database

This should have been the case from the beginning, there are many things
that would break if this was not followed.
This commit is contained in:
Magnus Hagander
2017-07-08 21:31:12 +02:00
parent 097a732031
commit cfcb543478
2 changed files with 20 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class MailingListGroup(models.Model):
class MailingList(models.Model):
group = models.ForeignKey(MailingListGroup, null=False)
listname = models.CharField(max_length=64, null=False, blank=False)
listname = models.CharField(max_length=64, null=False, blank=False, unique=True)
active = models.BooleanField(null=False, default=False)
externallink = models.URLField(max_length=200, null=True, blank=True)
description = models.TextField(null=False, blank=True)