Skip to content

Commit

Permalink
Remove unnecessary try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Sep 13, 2024
1 parent 74919b3 commit 4c5877b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions backend/iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,7 @@ def get_full_name(self) -> str:

def get_short_name(self) -> str:
"""get user's short name (i.e. first_name or email before @))"""
try:
return self.first_name if self.first_name else self.email.split("@")[0]
except:
return ""
return self.first_name if self.first_name else self.email.split("@")[0]

def mailing(self, email_template_name, subject, pk=False):
"""
Expand Down

0 comments on commit 4c5877b

Please sign in to comment.