#3455: Unlock current websites step even if there are none [litterbox] (#3840)

* Update to unlock with prior step for non-org request

* Update org model unlocking for current sites

* Update non-org unlocking
This commit is contained in:
Kim Allen 2025-06-03 16:15:26 -07:00 committed by GitHub
parent 952b2b652a
commit 7a205e491b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -1372,7 +1372,7 @@ class DomainRequest(TimeStampedModel):
def unlock_requesting_entity(self) -> bool:
"""Unlocks the requesting entity step. Used for the RequestingEntity page.
Returns true if requesting_entity_is_suborganization() and requesting_entity_is_portfolio().
Returns true if requesting_entity_is_suborganization() or requesting_entity_is_portfolio().
Returns False otherwise.
"""
if self.requesting_entity_is_suborganization() or self.requesting_entity_is_portfolio():

View file

@ -116,7 +116,7 @@ class DomainRequestWizard(TemplateView):
Step.ABOUT_YOUR_ORGANIZATION: lambda self: self.domain_request.about_your_organization is not None,
Step.SENIOR_OFFICIAL: lambda self: self.domain_request.senior_official is not None,
Step.CURRENT_SITES: lambda self: (
self.domain_request.current_websites.exists() or self.domain_request.requested_domain is not None
self.domain_request.current_websites.exists() or self.domain_request.senior_official is not None
),
Step.DOTGOV_DOMAIN: lambda self: self.domain_request.requested_domain is not None,
Step.PURPOSE: lambda self: self.domain_request.purpose is not None,
@ -135,7 +135,7 @@ class DomainRequestWizard(TemplateView):
PORTFOLIO_UNLOCKING_STEPS = {
PortfolioDomainRequestStep.REQUESTING_ENTITY: lambda w: w.from_model("unlock_requesting_entity", False),
PortfolioDomainRequestStep.CURRENT_SITES: lambda self: (
self.domain_request.current_websites.exists() or self.domain_request.requested_domain is not None
self.domain_request.current_websites.exists() or self.from_model("unlock_requesting_entity", False)
),
PortfolioDomainRequestStep.DOTGOV_DOMAIN: lambda self: self.domain_request.requested_domain is not None,
PortfolioDomainRequestStep.PURPOSE: lambda self: self.domain_request.purpose is not None,