]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Test on param_value changes as follows:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Tue, 30 Aug 2011 16:37:12 +0000 (17:37 +0100)
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Tue, 30 Aug 2011 16:37:12 +0000 (17:37 +0100)
            # 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)

quantum/api/api_common.py

index b3847bce204639c5044803da6f39f08b07698829..8272bc55a26c039f6f17745a3aae0c7da6b9c260 100644 (file)
@@ -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'):