Add defense_component to Portfolio when new task_order is created without an existing portfolio

This commit is contained in:
Montana
2019-02-26 10:26:23 -05:00
parent f8a6d04d64
commit 7ee8858cc7
7 changed files with 26 additions and 8 deletions

View File

@@ -104,6 +104,7 @@ class PortfolioFactory(Base):
model = Portfolio
name = factory.Faker("name")
defense_component = factory.LazyFunction(random_service_branch)
@classmethod
def _create(cls, model_class, *args, **kwargs):
@@ -227,7 +228,6 @@ class TaskOrderFactory(Base):
clin_02 = factory.LazyFunction(lambda *args: random.randrange(100, 100_000))
clin_04 = factory.LazyFunction(lambda *args: random.randrange(100, 100_000))
defense_component = factory.LazyFunction(random_service_branch)
app_migration = random_choice(data.APP_MIGRATION)
native_apps = random.choice(["yes", "no", "not_sure"])
complexity = [random_choice(data.APPLICATION_COMPLEXITY)]