Skip to content

Commit

Permalink
chore: rename unactive to inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Jul 25, 2023
1 parent 2e24f6b commit 9c0df2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ietf/ietfauth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def is_bofreq_editor(user, doc):
def openid_userinfo(claims, user):
# Populate claims dict.
person = get_object_or_404(Person, user=user)
email = person.email_allowing_unactive()
email = person.email_allowing_inactive()
if person.photo:
photo_url = person.cdn_photo_url()
else:
Expand Down
8 changes: 4 additions & 4 deletions ietf/person/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ def email(self):
e = self.email_set.filter(active=True).order_by("-time").first()
self._cached_email = e
return self._cached_email
def email_allowing_unactive(self):
if not hasattr(self, "_cached_email_allowing_unactive"):
def email_allowing_inactive(self):
if not hasattr(self, "_cached_email_allowing_inactive"):
e = self.email()
if not e:
e = self.email_set.order_by("-time").first()
log.assertion(statement="e is not None", note=f"Person {self.pk} has no Email objects")
self._cached_email_allowing_unactive = e
return self._cached_email_allowing_unactive
self._cached_email_allowing_inactive = e
return self._cached_email_allowing_inactive
def email_address(self):
e = self.email()
if e:
Expand Down

0 comments on commit 9c0df2d

Please sign in to comment.