From 0c9b6d5276c4bc98d2b87ce95510a20673f783d9 Mon Sep 17 00:00:00 2001 From: xixu <1208230467@qq.com> Date: Wed, 22 May 2024 10:48:27 +0800 Subject: [PATCH 1/2] dynamics options add Library Dataset support, fix a bug where the parameter value of from_dataset does not take effect on Library Dataset --- lib/galaxy/tools/parameters/dynamic_options.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index b8cd20dab37d..f592ed850b3c 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -23,6 +23,7 @@ from galaxy.model import ( DatasetCollectionElement, HistoryDatasetAssociation, + LibraryDatasetDatasetAssociation, HistoryDatasetCollectionAssociation, MetadataFile, User, @@ -965,6 +966,7 @@ def _get_ref_data(other_values, ref_name): ( DatasetFilenameWrapper, HistoryDatasetAssociation, + LibraryDatasetDatasetAssociation, DatasetCollectionElement, DatasetListWrapper, HistoryDatasetCollectionAssociation, @@ -976,7 +978,7 @@ def _get_ref_data(other_values, ref_name): raise ValueError if isinstance(ref, DatasetCollectionElement) and ref.hda: ref = ref.hda - if isinstance(ref, (DatasetFilenameWrapper, HistoryDatasetAssociation)): + if isinstance(ref, (DatasetFilenameWrapper, HistoryDatasetAssociation, LibraryDatasetDatasetAssociation)): ref = [ref] elif isinstance(ref, HistoryDatasetCollectionAssociation): ref = ref.to_hda_representative(multiple=True) From 79470fe167bb957db05d3e36ddbb16c17ba1317f Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Tue, 4 Jun 2024 15:41:54 +0200 Subject: [PATCH 2/2] Fix import order --- lib/galaxy/tools/parameters/dynamic_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index f592ed850b3c..e3e4097c907b 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -23,8 +23,8 @@ from galaxy.model import ( DatasetCollectionElement, HistoryDatasetAssociation, - LibraryDatasetDatasetAssociation, HistoryDatasetCollectionAssociation, + LibraryDatasetDatasetAssociation, MetadataFile, User, )