Don't attept to load up the workflows for abandoned studies.
This commit is contained in:
parent
8a66128189
commit
bb4000ff6d
|
@ -64,13 +64,15 @@ class StudyService(object):
|
||||||
study.files = list(files)
|
study.files = list(files)
|
||||||
|
|
||||||
# Calling this line repeatedly is very very slow. It creates the
|
# Calling this line repeatedly is very very slow. It creates the
|
||||||
# master spec and runs it.
|
# master spec and runs it. Don't execute this for Abandoned studies, as
|
||||||
status = StudyService.__get_study_status(study_model)
|
# we don't have the information to process them.
|
||||||
study.warnings = StudyService.__update_status_of_workflow_meta(workflow_metas, status)
|
if study.protocol_builder_status != ProtocolBuilderStatus.ABANDONED:
|
||||||
|
status = StudyService.__get_study_status(study_model)
|
||||||
|
study.warnings = StudyService.__update_status_of_workflow_meta(workflow_metas, status)
|
||||||
|
|
||||||
# Group the workflows into their categories.
|
# Group the workflows into their categories.
|
||||||
for category in study.categories:
|
for category in study.categories:
|
||||||
category.workflows = {w for w in workflow_metas if w.category_id == category.id}
|
category.workflows = {w for w in workflow_metas if w.category_id == category.id}
|
||||||
|
|
||||||
return study
|
return study
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue