@@ -44,15 +44,18 @@ class ApiClient:
44
44
45
45
data = None
46
46
47
- if method == 'GET' :
47
+ if queryParams :
48
+ # Need to remove None values, these should not be sent
49
+ sentQueryParams = {}
50
+ for param , value in queryParams .items ():
51
+ if value != None :
52
+ sentQueryParams [param ] = value
53
+ url = url + '?' + urllib .urlencode (sentQueryParams )
48
54
49
- if queryParams :
50
- # Need to remove None values, these should not be sent
51
- sentQueryParams = {}
52
- for param , value in queryParams .items ():
53
- if value != None :
54
- sentQueryParams [param ] = value
55
- url = url + '?' + urllib .urlencode (sentQueryParams )
55
+ if method in ['GET' ]:
56
+
57
+ #Options to add statements later on and for compatibility
58
+ pass
56
59
57
60
elif method in ['POST' , 'PUT' , 'DELETE' ]:
58
61
@@ -95,7 +98,7 @@ class ApiClient:
95
98
def sanitizeForSerialization (self , obj ):
96
99
"""Dump an object into JSON for POSTing."""
97
100
98
- if not obj :
101
+ if type ( obj ) == type ( None ) :
99
102
return None
100
103
elif type (obj ) in [str , int , long , float , bool ]:
101
104
return obj
@@ -164,6 +167,8 @@ class ApiClient:
164
167
value = attrType (value )
165
168
except UnicodeEncodeError :
166
169
value = unicode (value )
170
+ except TypeError :
171
+ value = value
167
172
setattr (instance , attr , value )
168
173
elif (attrType == 'datetime' ):
169
174
setattr (instance , attr , datetime .datetime .strptime (value [:- 5 ],
0 commit comments