docs: fix Task 6 plan snippet: PRAGMA table_info name index is c[1] not c[0]
This commit is contained in:
@@ -884,7 +884,7 @@ def get_bot(conn: Connection, bot_id: str) -> dict | None:
|
||||
row = conn.execute("SELECT * FROM bots WHERE id = ?", (bot_id,)).fetchone()
|
||||
if not row:
|
||||
return None
|
||||
cols = [c[0] for c in conn.execute("PRAGMA table_info(bots)").fetchall()]
|
||||
cols = [c[1] for c in conn.execute("PRAGMA table_info(bots)").fetchall()]
|
||||
d = dict(zip(cols, row))
|
||||
d["voice_samples"] = json.loads(d.pop("voice_samples_json"))
|
||||
d["traits"] = json.loads(d.pop("traits_json"))
|
||||
|
||||
Reference in New Issue
Block a user