Skip to content

Commit

Permalink
Handle unknown email address in TicketParticipant.get (#2145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Jan 23, 2025
1 parent 4259d3b commit c083ed1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion funnel/models/sync_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,11 @@ def absolute_url(self) -> str | None:
def get(
cls, current_project: Project, current_email: str
) -> TicketParticipant | None:
email_address = EmailAddress.get(current_email)
if not email_address:
return None
return cls.query.filter_by(
project=current_project, email_address=EmailAddress.get(current_email)
project=current_project, email_address=email_address
).one_or_none()

@classmethod
Expand Down

0 comments on commit c083ed1

Please sign in to comment.