load settings as json
This commit is contained in:
parent
c755fbdb99
commit
b835ddde91
@ -316,11 +316,11 @@ def import_categories(user, filename=None):
|
||||
if not user.store.get_prop(PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON_W):
|
||||
persistent_settings ={'settings': {'kopano': {'main': {'categories':data}}}}
|
||||
else:
|
||||
persistent_settings = user.store.get_prop(PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON_W)
|
||||
persistent_settings = json.loads(user.store.get_prop(PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON_W).value)
|
||||
persistent_settings['settings']['kopano']['main']['categories'] = data
|
||||
|
||||
print('Restoring categories for user {}'.format(user.name))
|
||||
user.store.create_prop(PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON_W, json.dumps(persistent_settings).decode('utf-8'))
|
||||
user.store.create_prop(PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON_W, json.dumps(persistent_settings))
|
||||
|
||||
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user