добавил проверку на обновление бд
This commit is contained in:
8
db/db.py
8
db/db.py
@@ -80,13 +80,7 @@ class Database:
|
|||||||
cur = self.con.cursor()
|
cur = self.con.cursor()
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
try:
|
try:
|
||||||
cur.execute(
|
cur.execute("INSERT INTO tags VALUES(?, ?)",(tag.id,tag.title))
|
||||||
"INSERT INTO tags VALUES(?, ?)",
|
|
||||||
(
|
|
||||||
tag.id,
|
|
||||||
tag.title
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.con.commit()
|
self.con.commit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug(e)
|
logger.debug(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user