fix db update
This commit is contained in:
parent
27007547bb
commit
1b2b4da490
@ -95,7 +95,7 @@ class SQLite(Abstract):
|
||||
with sqlite3.connect(self.dbpath) as con:
|
||||
for field, value in comment.iteritems(False):
|
||||
con.execute('UPDATE comments SET %s=? WHERE path=? AND id=?;' % field,
|
||||
(value, id, path))
|
||||
(value, path, id))
|
||||
|
||||
with sqlite3.connect(self.dbpath) as con:
|
||||
con.execute('UPDATE comments SET modified=? WHERE path=? AND id=?',
|
||||
|
@ -53,7 +53,7 @@ class TestSQLite(unittest.TestCase):
|
||||
c = self.db.get(path, id)
|
||||
|
||||
assert c.id == 1
|
||||
assert c.text == 'Foo'
|
||||
assert c.text == 'Bla'
|
||||
assert c.created < c.modified
|
||||
|
||||
def test_delete(self):
|
||||
|
Loading…
Reference in New Issue
Block a user