Skip to content

Commit b623a3a

Browse files
committed
add parents ArtifactHandler
1 parent c9e45cb commit b623a3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qiita_db/handlers/artifact.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def get(self, artifact_id):
7777
'processing_parameters': dict with the processing parameters used
7878
to generate the artifact or None
7979
'files': dict with the artifact files, keyed by filepath type
80+
'parents': list of the parents artifact ids
8081
"""
8182
with qdb.sql_connection.TRN:
8283
artifact = _get_artifact(artifact_id)
@@ -93,7 +94,8 @@ def get(self, artifact_id):
9394
artifact.can_be_submitted_to_vamps,
9495
'prep_information': [p.id for p in artifact.prep_templates],
9596
'study': study.id if study else None,
96-
'analysis': analysis.id if analysis else None}
97+
'analysis': analysis.id if analysis else None,
98+
'parents': [p.id for p in artifact.parents]}
9799
params = artifact.processing_parameters
98100
response['processing_parameters'] = (
99101
params.values if params is not None else None)

0 commit comments

Comments
 (0)