python脚本更新行时如何更新创建者列和协作人列

from seatable_api import Base, context
from seatable_api.exception import AuthExpiredError
import datetime
import re

SeaTable API相关信息

server_url = context.server_url or ‘https://xxx.com
api_token = ‘xxxxxx’ # 替换为实际API Token

base = Base(api_token, server_url)
base.auth()

获取当前登录用户的用户名和名称

current_user_id = context.current_username
print(current_user_id)
user_info = base.get_user_info(current_user_id)
current_user_name = user_info.get(‘name’, ‘unknown_user’)
print(current_user_name)
row_data = {
“协作人”: current_user_id
}
base.update_row(‘table1’, ‘SDRfW796QLGxm8JGFlRbYg’, row_data)

current_user_id和current_user_name都写不进去,反而会把原来存在的协作人清除,但是打印出来都有数据,求解答!感谢!

协作人类型的列是一个列表,创建者是一个字符串,您这里 row_data 应该写 {“协作人”: [current_user_id, ]}

修改人列应该怎么写?协作人好了,修改人报错: {“error_type”:“row_data_invalid”,“error_message”:“value ["71c52f6241fe4b89bb5278ada7e9b71e@auth.local"] in 修改人 invalid for last-modifier, string expected”}