mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-30 01:10:04 +02:00
Linting, fix domain.py
This commit is contained in:
parent
19af42ca49
commit
4110b37865
2 changed files with 6 additions and 4 deletions
|
@ -1418,14 +1418,16 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
def get_state_help_text(self) -> str:
|
||||
"""Returns a str containing additional information about a given state.
|
||||
Returns custom content for when the domain itself is expired."""
|
||||
if not self.is_expired() and self.state != self.State.UNKNOWN:
|
||||
help_text = Domain.State.get_help_text(self.state)
|
||||
else:
|
||||
|
||||
if self.is_expired() and self.state != self.State.UNKNOWN:
|
||||
# Given expired is not a physical state, but it is displayed as such,
|
||||
# We need custom logic to determine this message.
|
||||
help_text = (
|
||||
"This domain has expired, but it is still online. " "To renew this domain, contact help@get.gov."
|
||||
)
|
||||
else:
|
||||
help_text = Domain.State.get_help_text(self.state)
|
||||
|
||||
return help_text
|
||||
|
||||
def _disclose_fields(self, contact: PublicContact):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue