From 7ee4042592aa4b7a6aeb9a42d92ee75c604f5574 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 14 Sep 2019 11:49:34 +1000 Subject: [PATCH] fix an SQL query that was causing bots to use the wrong credentials --- functions.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/functions.py b/functions.py index 1654f6e..777b358 100644 --- a/functions.py +++ b/functions.py @@ -64,12 +64,8 @@ def make_post(args): FROM bots, credentials WHERE - bots.credentials_id = (SELECT - credentials_id - FROM - bots - WHERE - handle = %s) + bots.handle = %s + AND bots.credentials_id = credentials.id """, (handle,)) bot = dc.fetchone()