Fix tweet toggler
This commit is contained in:
parent
74239a16b8
commit
eb45d2b0cd
|
@ -90,7 +90,7 @@ class dbObject:
|
||||||
try:
|
try:
|
||||||
self.executeQuery("SELECT tweet FROM tokens WHERE cid = %i;" % int(cid))
|
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:
|
except:
|
||||||
raise ValueError("No such user: %i" % int(cid))
|
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.executeQuery("UPDATE tokens SET tweet = NOT tweet WHERE cid = %i;" % int(cid))
|
||||||
self.commit()
|
self.commit()
|
||||||
|
|
||||||
return getTStatus
|
return self.getTStatus(cid)
|
||||||
|
|
||||||
def addFish(self, cid):
|
def addFish(self, cid):
|
||||||
self.executeQuery("UPDATE tokens SET fish = fish + 1 WHERE cid = %i;" % int(cid))
|
self.executeQuery("UPDATE tokens SET fish = fish + 1 WHERE cid = %i;" % int(cid))
|
||||||
|
|
Loading…
Reference in a new issue