Skip to content

Commit 9291e42

Browse files
committed
update
1 parent 20aad65 commit 9291e42

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

zohocrm/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,14 @@ def insert_record(self, module_name, data):
219219
:param data:
220220
:return:
221221
"""
222-
print(666, data)
223222
if module_name.lower() not in WRITE_MODULE_LIST:
224-
print(1)
225223
return None
226224
url = BASE_URL + str(module_name)
227-
data = json.dumps(dict(data))
225+
formatted_data = {'data': []}
226+
formatted_data['data'].append(data)
228227
print('*********************')
229228
print('DATA: ', data)
230-
return self._post(url, data=data)
229+
return self._post(url, data=formatted_data)
231230

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

0 commit comments

Comments
 (0)