Error 'dict_items += list' when try to save code-editor settings

This commit is contained in:
Бородин Роман
2018-09-19 11:06:04 +03:00
parent 9375ea7378
commit fba90d31f4
+4 -1
View File
@@ -646,7 +646,10 @@ def edit():
# show settings tab and save prefernces
if 'settings' in request.vars:
if request.post_vars: # save new preferences
post_vars = request.post_vars.items()
if PY2:
post_vars = request.post_vars.items()
else:
post_vars = list(request.post_vars.items())
# Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings
post_vars += [(opt, 'false') for opt in preferences if opt not in request.post_vars]
if config.save(post_vars):