Skip to content

Commit

Permalink
Adding guardrain in prerequisits during affiliation request checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfekete committed Nov 29, 2023
1 parent ab5a10d commit e66a19c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion auth-api/src/auth_api/services/affiliation_invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def _validate_prerequisites(business_identifier, from_org_id, to_org_id, environ
raise BusinessException(Error.INVALID_BUSINESS_EMAIL, None)

# Validate that entity contact email exists
if contact and not contact.email:
if (contact and not contact.email) and \
affiliation_invitation_type != AffiliationInvitationType.REQUEST:
raise BusinessException(Error.INVALID_BUSINESS_EMAIL, None)

# Check if affiliation already exists
Expand Down

0 comments on commit e66a19c

Please sign in to comment.