From b2d52acefa62806f7587b5435fbb71fa33bc6739 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 12 Jun 2024 13:59:15 +0200 Subject: [PATCH] Fix null inputs in database operation tools And fix test that was supposed to cover this. Fixes https://github.com/galaxyproject/galaxy/issues/18384 --- lib/galaxy/tools/__init__.py | 4 +++- lib/galaxy/tools/build_list_1.2.0.xml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index d1fd2e199bee..7209daa65cf1 100644 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -3235,7 +3235,9 @@ def check_dataset_state(state): ) for input_dataset in input_datasets.values(): - check_dataset_state(input_dataset.state) + if input_dataset: + # None is a possible input for optional inputs + check_dataset_state(input_dataset.state) for input_dataset_collection_pairs in input_dataset_collections.values(): for input_dataset_collection, _ in input_dataset_collection_pairs: diff --git a/lib/galaxy/tools/build_list_1.2.0.xml b/lib/galaxy/tools/build_list_1.2.0.xml index 78eec798044e..457ae2b471da 100644 --- a/lib/galaxy/tools/build_list_1.2.0.xml +++ b/lib/galaxy/tools/build_list_1.2.0.xml @@ -44,7 +44,7 @@ Description This tool combines individual datasets or collections into a new collection. The simplest scenario is building a new colection from individual datasets (case **A** in the image below). You can merge a collection with individual dataset(s). In this case (see **B** in the image below) the individual dataset(s) will be merged with each element of the input collection to create a nested collection. Finally, two or more collection can be merged together creating a nested collection (case **C** in the image below). -.. class:: warningmark +.. class:: warningmark **Note**: When merging collections (e.g., case **C** below) the input collection **must** have equal number of elements. @@ -77,6 +77,7 @@ This tool will create a new collection from your history datasets but your quota +