mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Prevent setting -1 for rcid and postid to other values when feature disabled
This commit is contained in:
parent
a3eb577966
commit
fca9eb72b9
|
@ -17,7 +17,7 @@ class UpdateDB:
|
||||||
def update_db(self):
|
def update_db(self):
|
||||||
for update in self.updated:
|
for update in self.updated:
|
||||||
update_type = "postid" if update[2] is not None else "rcid"
|
update_type = "postid" if update[2] is not None else "rcid"
|
||||||
db_cursor.execute("UPDATE rcgcdw SET {} = ? WHERE wiki = ?".format(update_type), (update[1],update[0],))
|
db_cursor.execute("UPDATE rcgcdw SET {} = ? WHERE wiki = ? AND NOT ? = -1".format(update_type), (update[1], update[0], update_type))
|
||||||
db_connection.commit()
|
db_connection.commit()
|
||||||
self.clear_list()
|
self.clear_list()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue