Skip to content

Commit

Permalink
Minor cosmetics that hopefully clarifies what is going on here
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 15, 2021
1 parent 8a6edc7 commit 3a26059
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/galaxy/managers/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,15 @@ def _build_elements_from_rule_data(self, collection_type_description, rule_set,
found = True

if not found:
# Create a new collection whose elements are defined in the next loop
sub_collection: Dict[str, Any] = {}
sub_collection["src"] = "new_collection"
sub_collection["collection_type"] = collection_type_at_depth.collection_type
sub_collection["elements"] = {}
elements_at_depth[
identifier
] = sub_collection # ??? but this is overridenn on the next line??
elements_at_depth = sub_collection[
"elements"
] # ??? sub_collection is just lost?
# Update elements with new collection
elements_at_depth[identifier] = sub_collection
# Subsequent loop fills elements of newly created collection
elements_at_depth = sub_collection["elements"]

return elements

Expand Down

0 comments on commit 3a26059

Please sign in to comment.