Further cleanup

This commit is contained in:
zandercymatics 2024-08-13 14:10:50 -06:00
parent 9733fde689
commit 5f0b342986
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 15 additions and 14 deletions

View file

@ -121,6 +121,14 @@ class Portfolio(TimeStampedModel):
def __str__(self) -> str:
return str(self.organization_name)
@property
def portfolio_type(self):
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])
else:
return org_type
# == Getters for domains == #
def get_domains(self):
"""Returns all DomainInformations associated with this portfolio"""