Skip to content

Commit 0628c63

Browse files
committed
Check for None Type
Signed-off-by: George Sibble <[email protected]>
1 parent 4d05b5d commit 0628c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/python/swagger.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class ApiClient:
159159
instance = objClass()
160160

161161
for attr, attrType in instance.swaggerTypes.iteritems():
162-
if attr in obj and type(obj) in [list, dict]:
162+
if obj is not None and attr in obj and type(obj) in [list, dict]:
163163
value = obj[attr]
164164
if attrType in ['str', 'int', 'long', 'float', 'bool']:
165165
attrType = eval(attrType)

0 commit comments

Comments
 (0)