From 0628c63b15a44b430992834756df76b8bc547a23 Mon Sep 17 00:00:00 2001 From: George Sibble Date: Tue, 16 Jul 2013 14:32:17 -0700 Subject: [PATCH] Check for None Type Signed-off-by: George Sibble --- src/main/resources/python/swagger.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/python/swagger.mustache b/src/main/resources/python/swagger.mustache index b5761bbfb56..6cec36e4fed 100644 --- a/src/main/resources/python/swagger.mustache +++ b/src/main/resources/python/swagger.mustache @@ -159,7 +159,7 @@ class ApiClient: instance = objClass() for attr, attrType in instance.swaggerTypes.iteritems(): - if attr in obj and type(obj) in [list, dict]: + if obj is not None and attr in obj and type(obj) in [list, dict]: value = obj[attr] if attrType in ['str', 'int', 'long', 'float', 'bool']: attrType = eval(attrType)