From 24beedf467edb6f1801eaddcc2539982a2f81a6e Mon Sep 17 00:00:00 2001 From: b3yond Date: Sat, 14 Apr 2018 17:56:48 +0200 Subject: [PATCH] fixed several id typos --- user.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user.py b/user.py index 427bf2d..8dffa5d 100644 --- a/user.py +++ b/user.py @@ -133,9 +133,9 @@ class User(object): db.commit() def get_request_token(self): - db.execute("SELECT request_token, request_token_secret FROM twitter_request_tokens WHERE user_id = ?;", (id,)) + db.execute("SELECT request_token, request_token_secret FROM twitter_request_tokens WHERE user_id = ?;", (self.uid,)) request_token = db.cur.fetchone() - db.execute("DELETE FROM twitter_request_tokens WHERE user_id = ?;", (id,)) + db.execute("DELETE FROM twitter_request_tokens WHERE user_id = ?;", (self.uid,)) db.commit() return {"oauth_token" : request_token[0], "oauth_token_secret" : request_token[1]} @@ -143,7 +143,7 @@ class User(object): def save_twitter_token(self, access_token, access_token_secret): db.execute( "INSERT INTO twitter_accounts(user_id, access_token_key, access_token_secret) VALUES(?, ?, ?);", - (id, access_token, access_token_secret)) + (self.uid, access_token, access_token_secret)) db.commit() def get_twitter_token(self):