mailing: Fix error when deleting user from mailing when only email provided

This commit is contained in:
Antoine Bartuccio 2017-08-24 00:20:20 +02:00
parent 4f6109e27c
commit f65f261cfd

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 + ' '