Loading
Fix resuming job when job has optional data parameters
This fixes
```
ERROR galaxy.tools.actions:__init__.py:683 Cannot remap rerun dependencies.
Traceback (most recent call last):
File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 664, in _remap_job_on_rerun
self.__remap_parameters(job_to_remap, jtid, jtod, out_data)
File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in __remap_parameters
input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in <dictcomp>
input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not
NoneType
```
Optional data inputs or optional selects are stored as `None` (super
inconsistent, since most other parameters are stored as JOSN. We should
create "basic_2.py" using pydantic at one point not too far into the
future ...). This means we can't call `json.loads` on these. Fortunately
this is the only place we do it, and we don't need to consider optional
parameters here anyway.