lint and fix test

This commit is contained in:
zandercymatics 2025-01-28 09:58:41 -07:00
parent 8504eb1f39
commit ad79557a55
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 23 additions and 32 deletions

View file

@ -1293,9 +1293,13 @@ class DomainRequest(TimeStampedModel):
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),
).filter(agency=self.federal_agency).exists()
return (
FederalAgency.objects.exclude(
agency__in=Portfolio.objects.values_list("organization_name", flat=True),
)
.filter(agency=self.federal_agency)
.exists()
)
# NOTE: Shouldn't this be an AND on all required fields?
return (