Add New Portfolio Workflow

This commit is contained in:
George Drummond
2019-05-30 11:44:04 -04:00
parent ad5d704fa8
commit f7562714cb
12 changed files with 312 additions and 15 deletions

View File

@@ -15,10 +15,8 @@ class PortfolioError(Exception):
class Portfolios(object):
@classmethod
def create(cls, user, name, defense_component=None):
portfolio = PortfoliosQuery.create(
name=name, defense_component=defense_component
)
def create(cls, user, portfolio_attrs):
portfolio = PortfoliosQuery.create(**portfolio_attrs)
perms_sets = PermissionSets.get_many(PortfolioRoles.PORTFOLIO_PERMISSION_SETS)
Portfolios._create_portfolio_role(
user,