From: Salvatore Orlando Date: Tue, 30 Aug 2011 16:37:12 +0000 (+0100) Subject: Test on param_value changes as follows: X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e45508525633ebfdcf8870819276681dd409c233;p=openstack-build%2Fneutron-build.git Test on param_value changes as follows: # If the parameter wasn't found and it was required, return 400 if param_value is None and param['required']: msg = ("Failed to parse request. " + "Parameter: " + param_name + " not specified") for line in msg.split('\n'): LOG.error(line) raise exc.HTTPBadRequest(msg) --- diff --git a/quantum/api/api_common.py b/quantum/api/api_common.py index b3847bce2..8272bc55a 100644 --- a/quantum/api/api_common.py +++ b/quantum/api/api_common.py @@ -52,7 +52,7 @@ class QuantumController(wsgi.Controller): param_value = data.get(param_name, None) # If the parameter wasn't found and it was required, return 400 - if not param_value and param['required']: + if param_value is None and param['required']: msg = ("Failed to parse request. " + "Parameter: " + param_name + " not specified") for line in msg.split('\n'):