This commit is contained in:
zandercymatics 2024-08-13 14:01:20 -06:00
parent ceabc16c73
commit 9733fde689
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 83 additions and 32 deletions

View file

@ -23,11 +23,26 @@ class Portfolio(TimeStampedModel):
creator = models.ForeignKey(
"registrar.User",
on_delete=models.PROTECT,
help_text="Associated user",
verbose_name="Portfolio creator",
related_name="created_portfolios",
unique=False,
)
# Q for reviewers: shouldn't this be a required field?
organization_name = models.CharField(
null=True,
blank=True,
verbose_name="Portfolio organization",
)
organization_type = models.CharField(
max_length=255,
choices=OrganizationChoices.choices,
null=True,
blank=True,
help_text="Type of organization",
)
notes = models.TextField(
null=True,
blank=True,
@ -51,25 +66,11 @@ class Portfolio(TimeStampedModel):
senior_official = models.ForeignKey(
"registrar.SeniorOfficial",
on_delete=models.PROTECT,
help_text="Associated senior official",
unique=False,
null=True,
blank=True,
)
organization_type = models.CharField(
max_length=255,
choices=OrganizationChoices.choices,
null=True,
blank=True,
help_text="Type of organization",
)
organization_name = models.CharField(
null=True,
blank=True,
)
address_line1 = models.CharField(
null=True,
blank=True,
@ -118,7 +119,7 @@ class Portfolio(TimeStampedModel):
)
def __str__(self) -> str:
return f"{self.organization_name}"
return str(self.organization_name)
# == Getters for domains == #
def get_domains(self):