Skip to content

Commit ad5e3ee

Browse files
committed
Update api_gateway.py
1 parent 4b49981 commit ad5e3ee

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

seatable_api/api_gateway.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -279,20 +279,9 @@ def insert_row(self, table_name, row_data, anchor_row_id, apply_default=None):
279279
:param row_data: dict
280280
:param anchor_row_id: str
281281
"""
282-
url = self._row_server_url()
283-
json_data = {
284-
'table_name': table_name,
285-
'row': row_data,
286-
'anchor_row_id': anchor_row_id,
287-
}
288-
if like_table_id(table_name):
289-
json_data['table_id'] = table_name
290-
if apply_default is not None:
291-
json_data['apply_default'] = apply_default
292-
response = requests.post(url, json=json_data, headers=self.headers, timeout=self.timeout)
293-
return parse_response(response)
282+
return self.append_row(table_name, row_data, apply_default=apply_default)
283+
294284

295-
296285
def update_row(self, table_name, row_id, row_data):
297286
"""
298287
:param table_name: str

0 commit comments

Comments
 (0)