aligned logic on federal type across the application

This commit is contained in:
David Kennedy 2025-03-17 13:20:14 -04:00
parent f5429b97b0
commit e15499e4a6
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
5 changed files with 31 additions and 27 deletions

View file

@ -579,8 +579,8 @@ class DomainExport(BaseExport):
Q(portfolio__isnull=False) & Q(portfolio__federal_agency__isnull=False),
then=F("portfolio__federal_agency__federal_type"),
),
# Otherwise, return the natively assigned value
default=F("federal_type"),
# Otherwise, return the federal type from federal agency
default=F("federal_agency__federal_type"),
output_field=CharField(),
),
"converted_organization_name": Case(
@ -1654,8 +1654,8 @@ class DomainRequestExport(BaseExport):
Q(portfolio__isnull=False) & Q(portfolio__federal_agency__isnull=False),
then=F("portfolio__federal_agency__federal_type"),
),
# Otherwise, return the natively assigned value
default=F("federal_type"),
# Otherwise, return the federal type from federal agency
default=F("federal_agency__federal_type"),
output_field=CharField(),
),
"converted_organization_name": Case(