From 67d0202b4dd5a4162005740ba5100ab0b024d66c Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 6 Feb 2017 14:49:41 +0100 Subject: [PATCH] Fixed SQL query to properly handle changed handles --- filler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filler.py b/filler.py index bab2d54..10d94f5 100755 --- a/filler.py +++ b/filler.py @@ -107,7 +107,7 @@ def getFollowing(db=dbtools.dbHelper(), two=twitools.twObject(), firstrun=False) def getNames(db = dbtools.dbHelper(), two = twitools.twObject()): for user in twitools.getNamesByIDs(list(set(list(db.getFollowing()) + list(db.getFollowers())))): if not db.matchNameID(user["name"], user["id"]): - db.executeQuery("UPDATE names SET `until` = %i WHERE `id` = '%s' AND `name` = '%s';" % (int(time.time()), str(user["id"]), str(user["name"]))) + db.executeQuery("UPDATE names SET `until` = %i WHERE `id` = '%s';" % (int(time.time()), str(user["id"]))) db.executeQuery("INSERT INTO names VALUES('%s', '%s', %i, 0)" % (str(user["id"]), str(user["name"]), int(time.time()))) db.commit()