From e45508525633ebfdcf8870819276681dd409c233 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Tue, 30 Aug 2011 17:37:12 +0100 Subject: [PATCH] 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) --- quantum/api/api_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'): -- 2.45.2