Skip to content
Snippets Groups Projects
Commit 10caeced authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

No need to set modifiers in each iteration as it is the same each time

parent 91014c62
No related branches found
No related tags found
No related merge requests found
......@@ -326,6 +326,7 @@
)
view['fields'].update(elem_fields_def)
modifiers = json.loads(elem.attrib.get('modifiers', '{}'))
# Now we can insert the fields in the view's architecture.
for field in elem_fields:
attrs = {'name': field}
......@@ -329,7 +330,6 @@
# Now we can insert the fields in the view's architecture.
for field in elem_fields:
attrs = {'name': field}
modifiers = json.loads(elem.attrib.get('modifiers', '{}'))
attrs['modifiers'] = json.dumps({
attr: value for attr, value in modifiers.iteritems()
if attr != 'readonly' or
......
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