diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py
index 42fe49f58f4d..97fd83f8561a 100644
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -3660,14 +3660,13 @@ def produce_outputs(self, trans, out_data, output_collections, incoming, history
final_sorted_identifiers = [
element.element_identifier for element in elements1 if element.element_identifier in old_elements2_dict
]
- # Raise Exception if it is empty
if len(final_sorted_identifiers) == 0:
# Create empty collections:
output_collections.create_collection(
- next(iter(self.outputs.values())), "output1", elements={}, propagate_hda_tags=False
+ self.outputs["output1"], "output1", elements={}, propagate_hda_tags=False
)
output_collections.create_collection(
- next(iter(self.outputs.values())), "output2", elements={}, propagate_hda_tags=False
+ self.outputs["output2"], "output2", elements={}, propagate_hda_tags=False
)
return
@@ -3685,7 +3684,7 @@ def output_with_selected_identifiers(old_elements_dict, output_label):
self._add_datasets_to_history(history, new_elements.values())
# Create collections:
output_collections.create_collection(
- next(iter(self.outputs.values())), output_label, elements=new_elements, propagate_hda_tags=False
+ self.outputs[output_label], output_label, elements=new_elements, propagate_hda_tags=False
)
# Create outputs:
diff --git a/lib/galaxy/tools/harmonize_two_collections_list.xml b/lib/galaxy/tools/harmonize_two_collections_list.xml
index 7828ec5138e6..3a12173f04e8 100644
--- a/lib/galaxy/tools/harmonize_two_collections_list.xml
+++ b/lib/galaxy/tools/harmonize_two_collections_list.xml
@@ -171,6 +171,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+