From d5cb9d2ee8625f731dbc7a553a5cee5b0860330d Mon Sep 17 00:00:00 2001 From: Mohammadreza Pourreza <71866535+MohammadrezaPourreza@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:01:04 -0400 Subject: [PATCH] DH-4615/put the columns and results inside the with (#150) --- dataherald/sql_generator/create_sql_query_status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataherald/sql_generator/create_sql_query_status.py b/dataherald/sql_generator/create_sql_query_status.py index 198a6822..bc818354 100644 --- a/dataherald/sql_generator/create_sql_query_status.py +++ b/dataherald/sql_generator/create_sql_query_status.py @@ -20,8 +20,8 @@ def create_sql_query_status( query = db.parser_to_filter_commands(query) with db._engine.connect() as connection: execution = connection.execute(text(query)) - columns = execution.keys() - result = execution.fetchall() + columns = execution.keys() + result = execution.fetchall() if len(result) == 0: response.sql_query_result = None else: