mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
clubs: remove moderator and club from mailing form + display not moderated mailings
This commit is contained in:
@ -338,6 +338,8 @@ class Mailing(models.Model):
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
if Mailing.objects.filter(email=self.email).exists():
|
||||
raise ValidationError(_("This mailing list already exists."))
|
||||
if self.can_moderate(self.moderator):
|
||||
self.is_moderated = True
|
||||
else:
|
||||
|
Reference in New Issue
Block a user