Fixed problem where WorkflowService.make_test_workflow did not add a study to the workflow_model

This commit is contained in:
mike cullerton 2021-05-01 15:55:20 -04:00
parent 9465b6408d
commit 804926dbac
1 changed files with 2 additions and 0 deletions

View File

@ -57,10 +57,12 @@ class WorkflowService(object):
user = db.session.query(UserModel).filter_by(uid="test").first()
if not user:
db.session.add(UserModel(uid="test"))
db.session.commit()
study = db.session.query(StudyModel).filter_by(user_uid="test").first()
if not study:
db.session.add(StudyModel(user_uid="test", title="test"))
db.session.commit()
study = db.session.query(StudyModel).filter_by(user_uid="test").first()
workflow_model = WorkflowModel(status=WorkflowStatus.not_started,
workflow_spec_id=spec_id,
last_updated=datetime.now(),