forked from loafle/openapi-generator-original
Check for None Type
Signed-off-by: George Sibble <gsibble@gmail.com>
This commit is contained in:
parent
4d05b5d81f
commit
0628c63b15
@ -159,7 +159,7 @@ class ApiClient:
|
|||||||
instance = objClass()
|
instance = objClass()
|
||||||
|
|
||||||
for attr, attrType in instance.swaggerTypes.iteritems():
|
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]
|
value = obj[attr]
|
||||||
if attrType in ['str', 'int', 'long', 'float', 'bool']:
|
if attrType in ['str', 'int', 'long', 'float', 'bool']:
|
||||||
attrType = eval(attrType)
|
attrType = eval(attrType)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user