Skip to content

Commit 59dc58a

Browse files
authored
Merge pull request #618 from hubmapconsortium/Derek-Furst/remove-components-limit
Changed /components endpoint to allow any amount of datasets greater …
2 parents e3b3d46 + 3d96bf2 commit 59dc58a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3837,9 +3837,9 @@ def multiple_components():
38373837
if direct_ancestor_dict.get('entity_type').lower() != "dataset":
38383838
bad_request_error(f"Direct ancestor is of type: {direct_ancestor_dict.get('entity_type')}. Must be of type 'dataset'.")
38393839

3840-
# validate that there are 2 and only 2 datasets in the dataset list
3841-
if len(json_data_dict.get('datasets')) != 2:
3842-
bad_request_error(f"'datasets' field must contain 2 component datasets.")
3840+
# validate that there is at least one component dataset
3841+
if len(json_data_dict.get('datasets')) < 1:
3842+
bad_request_error(f"'datasets' field must contain at leawst 1 dataset.")
38433843

38443844
# Validate all datasets using existing schema with triggers and validators
38453845
for dataset in json_data_dict.get('datasets'):

0 commit comments

Comments
 (0)