mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-30 06:26:34 +02:00
Add unit test for waffle utility
This commit is contained in:
parent
297029a447
commit
1f9efb7fc0
2 changed files with 40 additions and 2 deletions
|
@ -322,6 +322,7 @@ class OrganizationContactForm(RegistrarForm):
|
|||
# if it has been filled in when required.
|
||||
# uncomment to see if modelChoiceField can be an arg later
|
||||
required=False,
|
||||
# We populate this queryset in init. We want to exclude agencies with a portfolio.
|
||||
queryset=FederalAgency.objects.none(),
|
||||
widget=ComboboxWidget,
|
||||
)
|
||||
|
@ -369,7 +370,6 @@ class OrganizationContactForm(RegistrarForm):
|
|||
|
||||
# Set the queryset for federal agency.
|
||||
# If the organization_requests flag is active, we hide data that exists in portfolios.
|
||||
# NOTE: This function assumes that the federal_agency field was first set to None if a portfolio exists.
|
||||
federal_agency_queryset = FederalAgency.objects.exclude(agency__in=self.excluded_agencies)
|
||||
if flag_is_active_anywhere("organization_feature") and flag_is_active_anywhere("organization_requests"):
|
||||
# Exclude both predefined agencies and those matching portfolio names in one query
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue