Fixing the failing tests by passing in workflow.id rather than workflow to the delete workflow endpoint

This commit is contained in:
Dan Funk 2020-08-10 13:51:05 -04:00
parent d3462d2e15
commit 56b161a234
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ def delete_workflow_specification(spec_id):
# Delete all events and workflow models related to this specification
for workflow in session.query(WorkflowModel).filter_by(workflow_spec_id=spec_id):
StudyService.delete_workflow(workflow)
StudyService.delete_workflow(workflow.id)
session.query(WorkflowSpecModel).filter_by(id=spec_id).delete()
session.commit()

View File

@ -79,7 +79,7 @@ class StudyService(object):
def delete_study(study_id):
session.query(TaskEventModel).filter_by(study_id=study_id).delete()
for workflow in session.query(WorkflowModel).filter_by(study_id=study_id):
StudyService.delete_workflow(workflow)
StudyService.delete_workflow(workflow.id)
session.query(StudyModel).filter_by(id=study_id).delete()
session.commit()