From 0dc422c7f648f57d8a0137eedc8a048f019f4670 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 18 Dec 2019 15:32:06 -0500 Subject: [PATCH] we need a commit at the end, but I don't really believe that. --- crc/api.py | 1 + tests/test_api.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crc/api.py b/crc/api.py index c954166b..ced00cb1 100644 --- a/crc/api.py +++ b/crc/api.py @@ -59,6 +59,7 @@ def add_workflow_to_study(study_id, body): study_id=study_id, workflow_spec_id=workflow_spec_model.id) db.session.add(workflow) + db.session.commit() def get_workflow(workflow_id): return db.session.query(WorkflowModel).filter_by(id=workflow_id).first() diff --git a/tests/test_api.py b/tests/test_api.py index ed0e913c..a906536e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -60,4 +60,5 @@ class TestStudy(BaseTest, unittest.TestCase): self.assertEqual(study.id, workflow.study_id) self.assertEqual(WorkflowStatus.user_input_required, workflow.status) self.assertIsNotNone(workflow.bpmn_workflow_json) - self.assertEqual(spec.id, workflow.workflow_spec_id) \ No newline at end of file + self.assertEqual(spec.id, workflow.workflow_spec_id) +