fixed deleting object date time
This commit is contained in:
parent
76df54ba1a
commit
d199ef6a56
1 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,13 @@ class DataStore:
|
|||
VALUES (?, ?, ?, ?)
|
||||
ON CONFLICT DO UPDATE SET "type" = ?, "url" = ?, "data" = ?
|
||||
"""
|
||||
delattr(item, 'datetime')
|
||||
|
||||
if hasattr(item, 'datetime'):
|
||||
try:
|
||||
delattr(item, 'datetime')
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
with sqlite3.connect(self.db_file) as db:
|
||||
db.execute(sqlStatement.strip(), (
|
||||
item._id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue