mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
Add missing override on user
This commit is contained in:
parent
f4b865c1f1
commit
28a4b3a0fb
1 changed files with 5 additions and 2 deletions
|
@ -161,10 +161,13 @@ class User(AbstractUser):
|
||||||
"""Return count of ineligible requests"""
|
"""Return count of ineligible requests"""
|
||||||
return self.domain_requests_created.filter(status=DomainRequest.DomainRequestStatus.INELIGIBLE).count()
|
return self.domain_requests_created.filter(status=DomainRequest.DomainRequestStatus.INELIGIBLE).count()
|
||||||
|
|
||||||
def get_formatted_name(self):
|
def get_formatted_name(self, return_unknown_when_none=True):
|
||||||
"""Returns the contact's name in Western order."""
|
"""Returns the contact's name in Western order."""
|
||||||
names = [n for n in [self.first_name, self.middle_name, self.last_name] if n]
|
names = [n for n in [self.first_name, self.middle_name, self.last_name] if n]
|
||||||
return " ".join(names) if names else "Unknown"
|
if names:
|
||||||
|
return " ".join(names)
|
||||||
|
else:
|
||||||
|
return "Unknown" if return_unknown_when_none else None
|
||||||
|
|
||||||
def has_contact_info(self):
|
def has_contact_info(self):
|
||||||
return bool(self.title or self.email or self.phone)
|
return bool(self.title or self.email or self.phone)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue