mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-29 14:06:32 +02:00
fix bug
This commit is contained in:
parent
8419d22f67
commit
d14a23621e
1 changed files with 9 additions and 8 deletions
|
@ -1302,15 +1302,16 @@ class DomainRequest(TimeStampedModel):
|
||||||
"""Unlocks the organization_contact step."""
|
"""Unlocks the organization_contact step."""
|
||||||
if flag_is_active_anywhere("organization_feature") and flag_is_active_anywhere("organization_requests"):
|
if flag_is_active_anywhere("organization_feature") and flag_is_active_anywhere("organization_requests"):
|
||||||
# Check if the current federal agency is an outlawed one
|
# Check if the current federal agency is an outlawed one
|
||||||
Portfolio = apps.get_model("registrar.Portfolio")
|
if self.organization_type == self.OrganizationChoices.FEDERAL and self.federal_agency:
|
||||||
return (
|
Portfolio = apps.get_model("registrar.Portfolio")
|
||||||
FederalAgency.objects.exclude(
|
return (
|
||||||
agency__in=Portfolio.objects.values_list("organization_name", flat=True),
|
FederalAgency.objects.exclude(
|
||||||
|
agency__in=Portfolio.objects.values_list("organization_name", flat=True),
|
||||||
|
)
|
||||||
|
.filter(agency=self.federal_agency)
|
||||||
|
.exists()
|
||||||
)
|
)
|
||||||
.filter(agency=self.federal_agency)
|
return bool(
|
||||||
.exists()
|
|
||||||
)
|
|
||||||
return (
|
|
||||||
self.federal_agency is not None
|
self.federal_agency is not None
|
||||||
or self.organization_name is not None
|
or self.organization_name is not None
|
||||||
or self.address_line1 is not None
|
or self.address_line1 is not None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue