From 8b73dd88834a62b3af6648f82e11468d97400f85 Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 4 Nov 2025 17:10:29 +0800 Subject: [PATCH] fix: GENERATE_SQL_QUERY_LIMIT_ENABLED not work while saving data --- backend/apps/chat/task/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py index d8359f1c..f699cc87 100644 --- a/backend/apps/chat/task/llm.py +++ b/backend/apps/chat/task/llm.py @@ -841,7 +841,7 @@ def save_sql_data(self, session: Session, data_obj: Dict[str, Any]): limit = 1000 if data_result: data_result = prepare_for_orjson(data_result) - if data_result and len(data_result) > limit: + if data_result and len(data_result) > limit and settings.GENERATE_SQL_QUERY_LIMIT_ENABLED: data_obj['data'] = data_result[:limit] data_obj['limit'] = limit else: