Simplify None/False logic

Co-authored-by: Seamus Johnston <seamus.johnston@gsa.gov>
This commit is contained in:
Neil MartinsenBurrell 2023-01-30 10:00:19 -06:00 committed by GitHub
parent e9b678e879
commit e086fcd9a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -500,17 +500,10 @@ class DomainApplication(TimeStampedModel):
user_choice = self.organization_type
if user_choice == DomainApplication.OrganizationChoices.TRIBAL:
# did answer tribal, check the recognition answers
if (
self.federally_recognized_tribe is not None
and self.state_recognized_tribe is not None
):
# have answered these questions
if (
not self.federally_recognized_tribe
and not self.state_recognized_tribe
):
return True
return False
return (
self.federally_recognized_tribe == False
and self.state_recognized_tribe == False
)
def show_organization_election(self) -> bool:
"""Show this step if the answer to the first question implies it.