Skip to content

Commit ecd7c36

Browse files
committed
Simplify SplitPairedAndUnpairedTool list:paired_or_unpaired dispatch
Now that the dataset collection manager rejects list:paired_or_unpaired collections containing raw HDAs, every element_object reaching the dispatch loop is guaranteed to be a paired_or_unpaired sub-collection. Drop the defensive getattr fallback added in 07832df.
1 parent 6172e9d commit ecd7c36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/galaxy/tools/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4065,8 +4065,8 @@ def _handle_paired(dce):
40654065
_handle_paired(element)
40664066
elif collection_type == "list:paired_or_unpaired":
40674067
for element in collection.elements:
4068-
sub_elements = getattr(element.element_object, "elements", None)
4069-
if not sub_elements or len(sub_elements) == 1:
4068+
sub_collection = element.element_object
4069+
if len(sub_collection.elements) == 1:
40704070
_handle_unpaired(element)
40714071
else:
40724072
_handle_paired(element)

0 commit comments

Comments
 (0)