mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
fix updating rcid
This commit is contained in:
parent
8a545bc23e
commit
00f7ec9b1d
|
@ -17,7 +17,7 @@ class UpdateDB:
|
||||||
def update_db(self):
|
def update_db(self):
|
||||||
for update in self.updated:
|
for update in self.updated:
|
||||||
if update[2] is None:
|
if update[2] is None:
|
||||||
sql = "UPDATE rcgcdw SET rcid = ? WHERE wiki = ? AND rcid != -1"
|
sql = "UPDATE rcgcdw SET rcid = ? WHERE wiki = ? AND ( rcid != -1 OR rcid IS NULL )"
|
||||||
else:
|
else:
|
||||||
sql = "UPDATE rcgcdw SET postid = ? WHERE wikiid = ?"
|
sql = "UPDATE rcgcdw SET postid = ? WHERE wikiid = ?"
|
||||||
db_cursor.execute(sql, (update[1], update[0],))
|
db_cursor.execute(sql, (update[1], update[0],))
|
||||||
|
|
Loading…
Reference in a new issue