From 8f72d14243a832e67e0b789dc9c547616291916a Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 2 Sep 2019 16:49:21 +1000 Subject: [PATCH] correctly display bot enabled status --- webui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 4368ca5..30ca0ed 100644 --- a/webui.py +++ b/webui.py @@ -35,7 +35,7 @@ def home(): c.execute("SELECT COUNT(*) FROM `bots` WHERE user_id = %s AND enabled = TRUE", (session['user_id'],)) active_count = c.fetchone()[0] dc = mysql.connection.cursor(MySQLdb.cursors.DictCursor) - dc.execute("SELECT `handle` FROM `bots` WHERE user_id = %s", (session['user_id'],)) + dc.execute("SELECT `handle`, `enabled` FROM `bots` WHERE user_id = %s", (session['user_id'],)) bots = dc.fetchall() dc.close() bot_users = {}