Fix sort error when re-running job with DCE collection input

Otherwise fails with
```
TypeError: '<' not supported between instances of 'NoneType' and 'int'
  File "galaxy/tools/__init__.py", line 2542, in populate_model
    tool_dict = input.to_dict(request_context, other_values=other_values)
  File "galaxy/tools/parameters/basic.py", line 2536, in to_dict
    d["options"]["hdca"] = sorted(d["options"]["hdca"], key=lambda k: k.get("hid", -1), reverse=True)
```

From https://sentry.galaxyproject.org/share/issue/1b0bcc83846b4b1891824776b0099545/
This commit is contained in:
mvdbeek
2023-05-22 09:28:54 +02:00
parent 024d94fe20
commit cac52b6f78
+1 -1
View File
@@ -2493,7 +2493,7 @@ class DataCollectionToolParameter(BaseDataToolParameter):
d["options"]["hdca"].append(
{
"id": trans.security.encode_id(dce.id),
"hid": None,
"hid": -1,
"name": dce.element_identifier,
"src": "dce",
"tags": [],