Skip to content

Commit

Permalink
Merge pull request #1488 from cisagov/za/main-migration-hotfix
Browse files Browse the repository at this point in the history
(Hotfix) Fix "needs_identity_verification" causing runtime error
  • Loading branch information
zandercymatics authored Dec 12, 2023
2 parents 2f6e7b4 + 8b0e5f0 commit a9a4d99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/registrar/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def needs_identity_verification(cls, email, uuid):

# A new incoming user who is being invited to be a domain manager (that is,
# their email address is in DomainInvitation for an invitation that is not yet "retrieved").
if DomainInvitation.objects.filter(email=email, status=DomainInvitation.INVITED).exists():
invited = DomainInvitation.DomainInvitationStatus.INVITED
if DomainInvitation.objects.filter(email=email, status=invited).exists():
return False

return True
Expand Down

0 comments on commit a9a4d99

Please sign in to comment.