updated comments to reflect tests; made logic more readable in needs_identity_verification

This commit is contained in:
David Kennedy 2023-12-08 17:32:25 -05:00
parent 0ed0cb6c37
commit f7fdecfd33
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 18 additions and 6 deletions

View file

@ -91,7 +91,7 @@ class User(AbstractUser):
# 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):
if DomainInvitation.objects.filter(email=email, status=DomainInvitation.INVITED).exists():
return False
return True