fix: check sql only contain read operation #814

This commit is contained in:
junjun
2026-01-29 14:44:58 +08:00
parent bf56c3e486
commit 07af6d0066
+1 -1
View File
@@ -468,7 +468,7 @@ def exec_sql(ds: CoreDatasource | AssistantOutDsSchema, sql: str, origin_column=
while sql.endswith(';'):
sql = sql[:-1]
# check execute sql only contain read operations
if not check_sql_read(sql):
if not check_sql_read(sql, ds):
raise ValueError(f"SQL can only contain read operations")
db = DB.get_db(ds.type)