Skip to content

Commit 51e6e71

Browse files
committed
update
1 parent 0fed0af commit 51e6e71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

zohocrm/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def insert_record(self, module_name, data):
219219
:param data:
220220
:return:
221221
"""
222+
print(666, data)
222223
if module_name not in WRITE_MODULE_LIST:
223224
return None
224225
if not isinstance(data, list):
@@ -228,7 +229,12 @@ def insert_record(self, module_name, data):
228229
if not isinstance(data[-1], dict):
229230
return None
230231
url = BASE_URL + str(module_name)
231-
return self._post(url, data={'data': data})
232+
try:
233+
response = self._post(url, data={'data': data})
234+
except Exception as e:
235+
print(e)
236+
return False
237+
return response
232238

233239
def _get(self, endpoint, params=None):
234240
headers = {'Authorization': 'Zoho-oauthtoken {0}'.format(self.access_token), }

0 commit comments

Comments
 (0)