diff --git a/dbtools/__init__.py b/dbtools/__init__.py index 5b006ef..32027ee 100644 --- a/dbtools/__init__.py +++ b/dbtools/__init__.py @@ -90,7 +90,7 @@ class dbObject: try: self.executeQuery("SELECT tweet FROM tokens WHERE cid = %i;" % int(cid)) - return True if self.cur.fetchone()[0] == 1 else False + return True if int(self.cur.fetchone()[0]) == 1 else False except: raise ValueError("No such user: %i" % int(cid)) @@ -99,7 +99,7 @@ class dbObject: self.executeQuery("UPDATE tokens SET tweet = NOT tweet WHERE cid = %i;" % int(cid)) self.commit() - return getTStatus + return self.getTStatus(cid) def addFish(self, cid): self.executeQuery("UPDATE tokens SET fish = fish + 1 WHERE cid = %i;" % int(cid))