From 628a587d9797106e83b7f624d1270b17f1870014 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 23 Jun 2021 16:39:58 -0400 Subject: [PATCH] We weren't committing to the database in the correct spot, so the delete wasn't sticking, and we were ending up with test workflows showing up in the main interface. --- crc/services/workflow_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crc/services/workflow_service.py b/crc/services/workflow_service.py index 11651f17..0e1474a9 100644 --- a/crc/services/workflow_service.py +++ b/crc/services/workflow_service.py @@ -88,10 +88,10 @@ class WorkflowService(object): # Also, delete any test study or user models that may have been created. for study in db.session.query(StudyModel).filter(StudyModel.user_uid == "test"): StudyService.delete_study(study.id) - db.session.commit() user = db.session.query(UserModel).filter_by(uid="test").first() if user: db.session.delete(user) + db.session.commit() @staticmethod @timeit