mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Convert bool-like string arguments to actual bool
This commit is contained in:
parent
f7802d724b
commit
b2dd7d97aa
1 changed files with 8 additions and 0 deletions
|
@ -402,6 +402,14 @@ class _ActionsMapPlugin(object):
|
|||
- arguments -- A dict of arguments for the route
|
||||
|
||||
"""
|
||||
|
||||
# Convert POST arguments to boolean if they look like one...
|
||||
for k, v in arguments.items():
|
||||
if v.lower() == "true":
|
||||
arguments[k] = True
|
||||
elif v.lower() == "false":
|
||||
arguments[k] = False
|
||||
|
||||
try:
|
||||
ret = self.actionsmap.process(arguments, timeout=30, route=_route)
|
||||
except MoulinetteError as e:
|
||||
|
|
Loading…
Add table
Reference in a new issue