Merge branch 'mailing' into 'master'

Fix error when deleting user from mailing when only email provided

See merge request !101
This commit is contained in:
Skia 2017-08-24 00:26:38 +02:00
commit b5e7a0d747

View File

@ -307,7 +307,7 @@ class MailingSubscription(models.Model):
return self.mailing.club.has_rights_in_club(user) or user.is_root or self.user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) return self.mailing.club.has_rights_in_club(user) or user.is_root or self.user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID)
def can_be_edited_by(self, user): def can_be_edited_by(self, user):
return (user is not None and user.id == self.user.id) return (self.user is not None and user.id == self.user.id)
def fetch_format(self): def fetch_format(self):
return self.email + ' ' return self.email + ' '