Skip to content

Commit d922946

Browse files
author
mrjf
committed
Merge pull request #37 from sibblegp/master
Fix Object Type Detection
2 parents a9e0635 + d7e93cb commit d922946

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/resources/python/swagger.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class ApiClient:
9898
def sanitizeForSerialization(self, obj):
9999
"""Dump an object into JSON for POSTing."""
100100

101-
if not obj:
101+
if type(obj) == type(None):
102102
return None
103103
elif type(obj) in [str, int, long, float, bool]:
104104
return obj

src/main/resources/python3/swagger.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class ApiClient:
102102
def sanitizeForSerialization(self, obj):
103103
"""Dump an object into JSON for POSTing."""
104104

105-
if not obj:
105+
if type(obj) == type(None):
106106
return None
107107
elif type(obj) in [str, int, float, bool]:
108108
return obj

0 commit comments

Comments
 (0)