From 8b9ed0d78712ef521252629d867a036fb754b647 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 16 Nov 2023 06:32:19 -0700 Subject: [PATCH] fix tests --- qiita_pet/handlers/api_proxy/processing.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qiita_pet/handlers/api_proxy/processing.py b/qiita_pet/handlers/api_proxy/processing.py index 63747c5da..f145bf191 100644 --- a/qiita_pet/handlers/api_proxy/processing.py +++ b/qiita_pet/handlers/api_proxy/processing.py @@ -122,10 +122,12 @@ def _helper_process_params(params): if artifact.artifact_type in extra_atypes: extra_atypes.remove(artifact.artifact_type) - for aa in artifact.prep_templates[0].artifact.descendants.nodes(): - atype = aa.artifact_type - if artifact_id != aa.id and atype in extra_atypes: - extra_artifacts[atype].append((aa.id, aa.name)) + pts = artifact.prep_templates + if pts: + for aa in pts[0].artifact.descendants.nodes(): + atype = aa.artifact_type + if artifact_id != aa.id and atype in extra_atypes: + extra_artifacts[atype].append((aa.id, aa.name)) if analysis is not None: analysis_artifacts = analysis.artifacts