Skip to content

Commit dcd59d3

Browse files
committed
Update main.py
1 parent ebd0d62 commit dcd59d3

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

seatable_api/main.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def remove_link(self, link_id, table_name, other_table_name, row_id, other_row_i
477477
response = requests.delete(url, json=json_data, headers=self.headers, timeout=self.timeout)
478478
return parse_response(response)
479479

480-
def update_link(self, link_id, table_id, other_table_id, row_id, other_rows_ids):
480+
def update_link(self, link_id, table_name, other_table_name, row_id, other_rows_ids):
481481
"""
482482
:param link_id: str
483483
:param table_id: str
@@ -490,15 +490,17 @@ def update_link(self, link_id, table_id, other_table_id, row_id, other_rows_ids)
490490
url = self._row_link_server_url()
491491
json_data = {
492492
'link_id': link_id,
493-
'table_id': table_id,
494-
'other_table_id': other_table_id,
493+
'table_id': table_name,
494+
'table_name': table_name,
495+
'other_table_id': other_table_name,
496+
'other_table_name': other_table_name,
495497
'row_id': row_id,
496498
'other_rows_ids': other_rows_ids,
497499
}
498500
response = requests.put(url, json=json_data, headers=self.headers, timeout=self.timeout)
499501
return parse_response(response)
500502

501-
def batch_update_links(self, link_id, table_id, other_table_id, row_id_list, other_rows_ids_map):
503+
def batch_update_links(self, link_id, table_name, other_table_name, row_id_list, other_rows_ids_map):
502504
"""
503505
:param link_id: str
504506
:param table_id: str
@@ -509,8 +511,10 @@ def batch_update_links(self, link_id, table_id, other_table_id, row_id_list, oth
509511
url = self._batch_update_row_link_server_url()
510512
json_data = {
511513
'link_id': link_id,
512-
'table_id': table_id,
513-
'other_table_id': other_table_id,
514+
'table_id': table_name,
515+
'table_name': table_name,
516+
'other_table_id': other_table_name,
517+
'other_table_name': other_table_name,
514518
'row_id_list': row_id_list,
515519
'other_rows_ids_map': other_rows_ids_map,
516520
}

0 commit comments

Comments
 (0)