mirror of
https://github.com/koniu/recoll-webui.git
synced 2025-10-03 17:59:50 +02:00
py: fix settings type-casting from defaults
This commit is contained in:
parent
be52e0f69d
commit
c588606aed
1 changed files with 2 additions and 5 deletions
7
webui.py
7
webui.py
|
@ -112,11 +112,8 @@ def get_config():
|
||||||
config['dirs'] = shlex.split(rc['main']['topdirs'])
|
config['dirs'] = shlex.split(rc['main']['topdirs'])
|
||||||
# get config from cookies or defaults
|
# get config from cookies or defaults
|
||||||
for k, v in DEFAULTS.items():
|
for k, v in DEFAULTS.items():
|
||||||
try:
|
value = select([bottle.request.get_cookie(k), v])
|
||||||
value = type(v)(bottle.request.get_cookie(k))
|
config[k] = type(v)(value)
|
||||||
except:
|
|
||||||
value = v
|
|
||||||
config[k] = value
|
|
||||||
# get mountpoints
|
# get mountpoints
|
||||||
config['mounts'] = {}
|
config['mounts'] = {}
|
||||||
for d in config['dirs']:
|
for d in config['dirs']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue