Skip to content
Snippets Groups Projects
Verified Commit 667408fb authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Remove unreachable code

The Role model has a not null constraint on the sponsor field, so it is
impossible for a Role object to not have this attribute.
parent 3147eb0a
No related branches found
No related tags found
1 merge request!183Tests/identity coverage
Pipeline #101796 passed
......@@ -79,12 +79,6 @@ def send_invite_mail(link: InvitationLink) -> Optional[str]:
return None
sponsor = link.invitation.role.sponsor
if not sponsor:
logger.warning(
"Unable to determine sponsor for invitation link with ID: {%s}", link.id
)
return None
return send_registration_mail(
email_address.value, f"{sponsor.first_name} {sponsor.last_name}"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment