[FIX] base_sparse_field_list_support: Value into the cache is string no more the object

pull/2533/head
Laurent Mignon (ACSONE) 2019-11-08 13:33:55 +01:00 committed by hda
parent ca1b70f1fd
commit 72dbf8af0f
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ def convert_to_cache(self, value, record, validate=True):
# cache format: dict / list
if value is False or value is None:
value = {}
return value if isinstance(value, (dict, list)) else json.loads(value)
return json.dumps(value) if isinstance(value, (dict, list)) else (value or None)
fields.Serialized.convert_to_cache = convert_to_cache