Skip to content
Snippets Groups Projects
Commit 45f8bc76 authored by Jose Borreguero's avatar Jose Borreguero
Browse files

Refs #21335 jsonify out of the conditional

parent 0d3ed23a
No related merge requests found
...@@ -635,15 +635,14 @@ class BASISReduction(PythonAlgorithm): ...@@ -635,15 +635,14 @@ class BASISReduction(PythonAlgorithm):
ws_name: str ws_name: str
Name of the workspace from which to retrieve and modify the logs Name of the workspace from which to retrieve and modify the logs
""" """
def jsonify(value):
r"""Cast non-standard objects to their closest standard
representation to enable JSON serialiation"""
if isinstance(value, np.ndarray):
return value.tolist()
return value
if self._as_json is None: if self._as_json is None:
self._as_json = {'properties': {}} self._as_json = json.loads(str(self))
#self._as_json = json.loads(str(self))
def jsonify(value):
r"""Cast non-standard objects to their closest standard
representation to enable JSON serialiation"""
if isinstance(value, np.ndarray):
return value.tolist()
return value
# Force serialization of the following properties even if having # Force serialization of the following properties even if having
# their default values # their default values
forced = {name: jsonify(self.getProperty(name).value) forced = {name: jsonify(self.getProperty(name).value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment