Commit e7a08b09 authored by Romain Courteaud's avatar Romain Courteaud

erp5_hal_json_style: copy the hashscript dictionnaries

parent 5c1eb65e
......@@ -477,7 +477,9 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k
# This allows to support client without the parallelistfield JS implementation
hash_script_id = field.get_value('hash_script_id')
if hash_script_id:
result.update({"subfield_list": getattr(field, hash_script_id)(
# Copy the dict, as some hashscript cache the result,
# which should not in this case be modified
result.update({"subfield_list": [x.copy() for x in getattr(field, hash_script_id)(
[x for x in result['items'] if (x[1] and x[0])],
# Drop empty values
result['default'],
......@@ -492,7 +494,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k
'editable': result['editable']
},
is_right_display=0
)})
)]})
for subdict in result['subfield_list']:
if subdict['title'] == ' ':
subdict['title'] = ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment