Added type conversion for the "reason" parameter

This commit is contained in:
Anton Beloglazov 2012-10-02 15:33:48 +10:00
parent b3e26767de
commit 2833f52afc

View File

@ -171,9 +171,12 @@ def get_params(request):
:type request: *
:return: The request data dictionary.
:rtype: dict(str: str)
:rtype: dict(str: *)
"""
return dict(request.forms)
params = dict(request.forms)
if 'reason' in params:
params['reason'] = int(params['reason'])
return params
@bottle.put('/')