mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-12 14:08:28 +02:00
Add comments
This commit is contained in:
parent
40c52c4691
commit
ffb7e146c7
4 changed files with 10 additions and 2 deletions
|
@ -2,7 +2,6 @@ from django.db import models
|
|||
|
||||
from registrar.models.domain_request import DomainRequest
|
||||
from registrar.models.federal_agency import FederalAgency
|
||||
from registrar.models.utility.portfolio_helper import UserPortfolioRoleChoices
|
||||
from registrar.utility.constants import BranchChoices
|
||||
|
||||
from .utility.time_stamped_model import TimeStampedModel
|
||||
|
@ -123,6 +122,8 @@ 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."""
|
||||
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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue