fix db update

pull/16/head
posativ 12 years ago
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…
Cancel
Save