Finishing touches

This commit is contained in:
zandercymatics 2024-08-14 09:31:25 -06:00
parent ffb7e146c7
commit fdc5236968
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 104 additions and 17 deletions

View file

@ -122,11 +122,11 @@ class Portfolio(TimeStampedModel):
@property
def portfolio_type(self):
"""Returns a combination of organization_type and federal_agency,
seperated by ' - '. If no federal_agency is found, we just return the org type."""
"""Returns a combination of organization_type and federal_type,
seperated by ' - '. If no federal_type is found, we just return the org type."""
org_type = self.OrganizationChoices.get_org_label(self.organization_type)
if self.organization_type == self.OrganizationChoices.FEDERAL and self.federal_agency:
return " - ".join([org_type, self.federal_agency.agency])
if self.organization_type == self.OrganizationChoices.FEDERAL and self.federal_type:
return " - ".join([org_type, self.federal_type])
else:
return org_type