Update server/db/db_helper.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Ingo Ratsdorf
2025-09-10 10:21:32 +12:00
committed by GitHub
parent a94c6a291e
commit 2836996a21

View File

@@ -203,8 +203,8 @@ def get_table_json(sql, sql_query):
result = {"data": [row_to_json(column_names, row) for row in rows]}
return json_obj(result, column_names)
else:
# the SQL query returned no rows
return json_obj({}, []) # return empty object
result = {"data": []}
return json_obj(result, column_names)
#-------------------------------------------------------------------------------