Quazim0t0 commited on
Commit
ef52b84
·
verified ·
1 Parent(s): e7913a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -144,7 +144,7 @@ def sql_engine(query: str) -> str:
144
  rows = con.execute(text(query)).fetchall()
145
  if not rows:
146
  return "No results found."
147
- if len(rows) 1 and len(rows[0]) 1:
148
  return str(rows[0][0])
149
  return "\n".join([", ".join(map(str, row)) for row in rows])
150
  except Exception as e:
 
144
  rows = con.execute(text(query)).fetchall()
145
  if not rows:
146
  return "No results found."
147
+ if len(rows) == 1 and len(rows[0]) == 1: # Fixed the comparison operators here
148
  return str(rows[0][0])
149
  return "\n".join([", ".join(map(str, row)) for row in rows])
150
  except Exception as e: