From d945ab660ff05b250bea96095306aa7657234405 Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 23 Sep 2025 11:19:22 +0800 Subject: [PATCH] fix: fix Elasticsearch error --- backend/apps/db/db_sql.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/apps/db/db_sql.py b/backend/apps/db/db_sql.py index 030666ca..66616b70 100644 --- a/backend/apps/db/db_sql.py +++ b/backend/apps/db/db_sql.py @@ -140,6 +140,8 @@ def get_table_sql(ds: CoreDatasource, conf: DatasourceConf, db_version: str = '' WHERE TABLE_SCHEMA = %s """, conf.database + elif ds.type == "es": + return "", None def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = None): @@ -273,3 +275,5 @@ def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = No """ sql2 = " AND TABLE_NAME = %s" if table_name is not None and table_name != "" else "" return sql1 + sql2, conf.database, table_name + elif ds.type == "es": + return "", None, None