mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 01:11:55 +02:00
use defaults
This commit is contained in:
parent
12eab5c44f
commit
11d662aa3c
2 changed files with 7 additions and 1 deletions
|
@ -71,7 +71,10 @@ class Command(BaseCommand):
|
|||
if federal_agency.so_federal_agency.exists():
|
||||
portfolio_args["senior_official"] = federal_agency.so_federal_agency.first()
|
||||
|
||||
portfolio, created = Portfolio.objects.get_or_create(**portfolio_args)
|
||||
portfolio, created = Portfolio.objects.get_or_create(
|
||||
organization_name=portfolio_args.get("organization_name"),
|
||||
defaults=portfolio_args
|
||||
)
|
||||
|
||||
if created:
|
||||
message = f"Created portfolio '{portfolio}'"
|
||||
|
|
|
@ -1428,3 +1428,6 @@ class TestCreateFederalPortfolio(TestCase):
|
|||
# == create_suborganizations tests == #
|
||||
# == handle_portfolio_requests tests == #
|
||||
# == handle_portfolio_domains tests == #
|
||||
# test for parse_requests
|
||||
# test for parse_domains
|
||||
# test for both
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue