Fix some bugs in mailings with new club tools

This commit is contained in:
2017-10-02 13:16:43 +02:00
parent 4800db3c2c
commit 8146186447
5 changed files with 14 additions and 9 deletions

View File

@ -347,8 +347,14 @@ class MailingSubscription(models.Model):
def can_be_edited_by(self, user):
return (self.user is not None and user.id == self.user.id)
@property
def get_email(self):
if self.user and not self.email:
return self.user.email
return self.email
def fetch_format(self):
return self.email + ' '
return self.get_email + ' '
def __str__(self):
if self.user: