File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,11 +581,12 @@ def get_cohort_sgs(cohort_id: str) -> dict:
581581 message = entries ['errors' ][0 ]['message' ]
582582 raise MetamistError (f'Error fetching cohort: { message } ' )
583583
584- cohort_status = entries ['cohorts' ][0 ]['status' ]
585- if cohort_status .lower () != 'active' : # support upper and lower formats during migration
586- raise MetamistError (
587- f'Cohort { cohort_id } is { cohort_status } . Only active cohorts are allowed. Please check the input cohort list.'
588- )
584+ # inactive cohorts were already flagged during check_for_inactive_cohorts().
585+ # This check is skipped completely if the configuration options allow for use of inactive cohorts
586+ if not config_retrieve (['workflow' , 'permit_inactive_cohorts' ], False ):
587+ cohort_status = entries ['cohorts' ][0 ]['status' ]
588+ if cohort_status .lower () != 'active' :
589+ raise MetamistError (f'Cohort { cohort_id } is { cohort_status } . Only active cohorts are allowed.' )
589590
590591 cohort_name = entries ['cohorts' ][0 ]['name' ]
591592 cohort_dataset = entries ['cohorts' ][0 ]['project' ]['dataset' ]
You can’t perform that action at this time.
0 commit comments