Skip to content

Commit

Permalink
Simplify setting hashes
Browse files Browse the repository at this point in the history
Co-authored-by: Nicola Soranzo <[email protected]>
  • Loading branch information
mvdbeek and nsoranzo authored Nov 7, 2024
1 parent 971e1ca commit dc8753a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/galaxy/model/store/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,7 @@ def replace_request_syntax_sugar(obj):
new_hashes.append({"hash_function": key, "hash_value": obj[key.lower()]})
del obj[key.lower()]

if not obj.get("hashes"):
obj["hashes"] = []
obj["hashes"].extend(new_hashes)
obj.setdefault("hashes", []).extend(new_hashes)


class DiscoveredFile(NamedTuple):
Expand Down

0 comments on commit dc8753a

Please sign in to comment.