Skip to content

Commit 6a89495

Browse files
committed
no prep_template, parents or analysis provided
1 parent 5a2cab2 commit 6a89495

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

qiita_db/artifact.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ def create(
364364
raise qdb.exceptions.QiitaDBArtifactCreationError(
365365
"Not valid: both prep_template and data_type need to be provided"
366366
)
367+
elif not bool(prep_template) and not bool(parents) and not bool(analysis):
368+
raise qdb.exceptions.QiitaDBArtifactCreationError(
369+
"Not valid: no prep_template, parents or analysis provided"
370+
)
367371

368372
# There are three different ways of creating an Artifact, but all of
369373
# them execute a set of common operations. Declare functions to avoid

0 commit comments

Comments
 (0)