Skip to content

Commit

Permalink
DH-4857/removing NONE status and empty the response (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadrezaPourreza authored and DishenWang2023 committed May 7, 2024
1 parent cc7f2aa commit 94b84d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dataherald/sql_generator/create_sql_query_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def create_sql_query_status(
) -> Response:
"""Find the sql query status and populate the fields sql_query_result, sql_generation_status, and error_message"""
if query == "":
response.sql_generation_status = "NONE"
response.sql_generation_status = "INVALID"
response.response = ""
response.sql_query_result = None
response.error_message = None
else:
Expand Down Expand Up @@ -54,6 +55,7 @@ def create_sql_query_status(
) from e
except Exception as e:
response.sql_generation_status = "INVALID"
response.response = ""
response.sql_query_result = None
response.error_message = str(e)
return response

0 comments on commit 94b84d5

Please sign in to comment.