Skip to content

Commit

Permalink
DH-4615/put the columns and results inside the with (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadrezaPourreza authored Sep 7, 2023
1 parent 0571d22 commit d5cb9d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataherald/sql_generator/create_sql_query_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d5cb9d2

Please sign in to comment.