Fix bug with unknown and add test for it

This commit is contained in:
zandercymatics 2024-02-05 12:00:31 -07:00
parent e27054cd25
commit 0a921e1442
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 36 additions and 1 deletions

View file

@ -1418,7 +1418,7 @@ 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():
if not self.is_expired() and self.state != self.State.UNKNOWN:
help_text = Domain.State.get_help_text(self.state)
else:
# Given expired is not a physical state, but it is displayed as such,