mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-26 11:03:49 +02:00
User portfolio suggestions
This commit is contained in:
parent
6aa7546c2e
commit
d80287a428
4 changed files with 38 additions and 14 deletions
|
@ -132,13 +132,20 @@ class Portfolio(TimeStampedModel):
|
|||
return federal_agency.federal_type if federal_agency else None
|
||||
|
||||
# == Getters for domains == #
|
||||
def get_domains(self):
|
||||
def get_domains(self, order_by=None):
|
||||
"""Returns all DomainInformations associated with this portfolio"""
|
||||
return self.information_portfolio.all()
|
||||
if not order_by:
|
||||
return self.information_portfolio.all()
|
||||
else:
|
||||
return self.information_portfolio.all().order_by(*order_by)
|
||||
|
||||
def get_domain_requests(self):
|
||||
def get_domain_requests(self, order_by=None):
|
||||
"""Returns all DomainRequests associated with this portfolio"""
|
||||
return self.DomainRequest_portfolio.all()
|
||||
if not order_by:
|
||||
return self.DomainRequest_portfolio.all()
|
||||
else:
|
||||
return self.DomainRequest_portfolio.all().order_by(*order_by)
|
||||
|
||||
|
||||
# == Getters for suborganization == #
|
||||
def get_suborganizations(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue