Update src/registrar/admin.py

Co-authored-by: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
This commit is contained in:
CuriousX 2024-06-17 20:57:57 -06:00 committed by GitHub
parent 767fc4a2ff
commit 2c96eebc6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2572,8 +2572,8 @@ class PortfolioAdmin(ListHeaderAdmin):
# org name and it is a federal organization, have this field fill with
# the federal agency text name.
is_federal = obj.organization_type == DomainRequest.OrganizationChoices.FEDERAL
if is_federal:
obj.organization_name = obj.organization_type
if is_federal and obj.organization_name is None:
obj.organization_name = obj.federal_agency.agency
# NOTE: What is meant by "federal agency text name?"
super().save_model(request, obj, form, change)