ninooo96 commited on
Commit
5db8157
·
1 Parent(s): 8343753

minor bug fixed

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -212,7 +212,7 @@ def find_logic(title):
212
  if not turso_conn:
213
  yield gr.update(visible=False), gr.update(visible=True), [], gr.update(value="Database non connesso.", visible=True)
214
  return
215
- rows = turso_conn.execute(f"SELECT id, title, author, year FROM books WHERE title LIKE '%{title}%' LIMIT 10").fetchall() conn.close()
216
 
217
  # DATI PER LA TABELLA
218
  data = [[str(r[1]), str(r[2]), str(r[3])] for r in rows]
 
212
  if not turso_conn:
213
  yield gr.update(visible=False), gr.update(visible=True), [], gr.update(value="Database non connesso.", visible=True)
214
  return
215
+ rows = turso_conn.execute(f"SELECT id, title, author, year FROM books WHERE title LIKE '%{title}%' LIMIT 10").fetchall()
216
 
217
  # DATI PER LA TABELLA
218
  data = [[str(r[1]), str(r[2]), str(r[3])] for r in rows]