Fixing the failing tests by passing in workflow.id rather than workflow to the delete workflow endpoint
This commit is contained in:
parent
d3462d2e15
commit
56b161a234
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue