fix db update

This commit is contained in:
posativ 2012-10-17 10:56:43 +02:00
parent 27007547bb
commit 1b2b4da490
2 changed files with 2 additions and 2 deletions

View File

@ -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=?',

View File

@ -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):