Skip to content

Commit

Permalink
[#929] Removed redundant variables
Browse files Browse the repository at this point in the history
  • Loading branch information
vaszig committed Dec 1, 2022
1 parent 2394f1b commit b89f152
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/open_inwoner/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ def is_not_active(self):
return not self.is_active

def get_contact_email(self):
email = self.email
return email if "@example.org" not in email else ""
return self.email if "@example.org" not in self.email else ""

def get_active_contacts(self):
return self.user_contacts.filter(is_active=True)
Expand Down Expand Up @@ -590,10 +589,7 @@ class Meta:
verbose_name_plural = _("Invitations")

def __str__(self):
invitee = self.invitee
return (
f"For: {invitee if invitee else _('new user')} ({self.created_on.date()})"
)
return f"For: {self.invitee if self.invitee else _('new user')} ({self.created_on.date()})"

def save(self, **kwargs):
if not self.pk:
Expand Down

0 comments on commit b89f152

Please sign in to comment.