Fix logic bug in param check
This commit is contained in:
parent
679044574a
commit
5f2729f41f
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ def param_required(param_name, allow_body=False):
|
|||
@wraps(wrapped)
|
||||
def decorated(*args, **kwargs):
|
||||
if param_name not in request.args:
|
||||
if not allow_body and param_name not in request.values:
|
||||
if not allow_body or param_name not in request.values:
|
||||
abort(make_response('Required param: %s' % param_name, 400))
|
||||
return wrapped(*args, **kwargs)
|
||||
return decorated
|
||||
|
|
Reference in a new issue