Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/galaxy/tools/parameters/dynamic_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,10 @@ def _get_ref_data(other_values, ref_name):
if is_runtime_value(ref):
return []
raise ValueError
if isinstance(ref, DatasetCollectionElement) and ref.hda:
ref = ref.hda
if isinstance(ref, DatasetCollectionElement):
return ref.dataset_instances
if isinstance(ref, (DatasetFilenameWrapper, HistoryDatasetAssociation, LibraryDatasetDatasetAssociation)):
ref = [ref]
return [ref]
elif isinstance(ref, HistoryDatasetCollectionAssociation):
ref = ref.to_hda_representative(multiple=True)
return ref.to_hda_representative(multiple=True)
return ref
20 changes: 20 additions & 0 deletions lib/galaxy_test/api/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,26 @@ def test_build_request_dbkey_filter_unset(self):
assert "hg18_value" in option_values
assert "mm10_value" in option_values

@skip_without_tool("dbkey_filter_collection_input")
def test_run_dbkey_filter_nested_collection_dce(self):
with self.dataset_populator.test_history() as history_id:
list_list = self.dataset_collection_populator.create_list_of_list_in_history(history_id, wait=True).json()
# Set dbkey on the datasets in the inner list
for outer_element in list_list["elements"]:
for inner_element in outer_element["object"]["elements"]:
hda_id = inner_element["object"]["id"]
self.dataset_populator._put(
f"histories/{history_id}/contents/{hda_id}", {"genome_build": "hg19"}, json=True
)
# Get DCE ID of the inner list element - this is a DatasetCollectionElement
# wrapping a child collection (not an HDA)
dce_id = list_list["elements"][0]["id"]
inputs = {
"inputs": {"src": "dce", "id": dce_id},
"index": "hg19_value",
}
self._run("dbkey_filter_collection_input", history_id, inputs, assert_ok=True)

@skip_without_tool("cheetah_problem_unbound_var_input")
def test_legacy_biotools_xref_injection(self):
url = self._api_url("tools/cheetah_problem_unbound_var_input")
Expand Down
Loading