mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 05:08:32 +00:00
In get study, only process categories when we ask
This commit is contained in:
parent
405c63aaef
commit
f4d6b07467
@ -51,7 +51,7 @@ class StudyService(object):
|
|||||||
studies = []
|
studies = []
|
||||||
for study_model in db_studies:
|
for study_model in db_studies:
|
||||||
if include_invalid or study_model.review_type in self.VALID_REVIEW_TYPES:
|
if include_invalid or study_model.review_type in self.VALID_REVIEW_TYPES:
|
||||||
studies.append(StudyService.get_study(study_model.id, categories, study_model=study_model))
|
studies.append(StudyService.get_study(study_model.id, categories, study_model=study_model, process_categories=False))
|
||||||
return studies
|
return studies
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -69,7 +69,7 @@ class StudyService(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@timeit
|
@timeit
|
||||||
def get_study(study_id, categories: List[WorkflowSpecCategory], study_model: StudyModel = None,
|
def get_study(study_id, categories: List[WorkflowSpecCategory], study_model: StudyModel = None,
|
||||||
master_workflow_results=None):
|
master_workflow_results=None, process_categories=False):
|
||||||
"""Returns a study model that contains all the workflows organized by category.
|
"""Returns a study model that contains all the workflows organized by category.
|
||||||
Pass in the results of the master workflow spec, and the status of other workflows will be updated."""
|
Pass in the results of the master workflow spec, and the status of other workflows will be updated."""
|
||||||
last_time = firsttime()
|
last_time = firsttime()
|
||||||
@ -95,6 +95,7 @@ class StudyService(object):
|
|||||||
DocumentService.get_dictionary()) for model in files)
|
DocumentService.get_dictionary()) for model in files)
|
||||||
study.files = list(files)
|
study.files = list(files)
|
||||||
last_time = sincetime("files", last_time)
|
last_time = sincetime("files", last_time)
|
||||||
|
if process_categories:
|
||||||
if study.status != StudyStatus.abandoned:
|
if study.status != StudyStatus.abandoned:
|
||||||
for category in study.categories:
|
for category in study.categories:
|
||||||
workflow_metas = StudyService._get_workflow_metas(study_id, category)
|
workflow_metas = StudyService._get_workflow_metas(study_id, category)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user