mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 13:06:30 +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."""
|
||||
if flag_is_active_anywhere("organization_feature") and flag_is_active_anywhere("organization_requests"):
|
||||
# Check if the current federal agency is an outlawed one
|
||||
Portfolio = apps.get_model("registrar.Portfolio")
|
||||
return (
|
||||
FederalAgency.objects.exclude(
|
||||
agency__in=Portfolio.objects.values_list("organization_name", flat=True),
|
||||
if self.organization_type == self.OrganizationChoices.FEDERAL and self.federal_agency:
|
||||
Portfolio = apps.get_model("registrar.Portfolio")
|
||||
return (
|
||||
FederalAgency.objects.exclude(
|
||||
agency__in=Portfolio.objects.values_list("organization_name", flat=True),
|
||||
)
|
||||
.filter(agency=self.federal_agency)
|
||||
.exists()
|
||||
)
|
||||
.filter(agency=self.federal_agency)
|
||||
.exists()
|
||||
)
|
||||
return (
|
||||
return bool(
|
||||
self.federal_agency is not None
|
||||
or self.organization_name is not None
|
||||
or self.address_line1 is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue