Merge pull request #254 from coreos-inc/paramcheckfix

Fix logic bug in param check
This commit is contained in:
Jake Moshenko 2015-07-20 17:05:25 -04:00
commit ea574cf689

View file

@ -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