mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-12 14:08:28 +02:00
Merge branch 'main' into za/2520-admin-portfolio-view
This commit is contained in:
commit
5afad6b91d
11 changed files with 337 additions and 4 deletions
|
@ -148,3 +148,12 @@ class Portfolio(TimeStampedModel):
|
|||
def get_suborganizations(self):
|
||||
"""Returns all suborganizations associated with this portfolio"""
|
||||
return self.portfolio_suborganizations.all()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
"""Save override for custom properties"""
|
||||
|
||||
# The urbanization field is only intended for the state_territory puerto rico
|
||||
if self.state_territory != self.StateTerritoryChoices.PUERTO_RICO and self.urbanization:
|
||||
self.urbanization = None
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue