diff --git a/isso/db.py b/isso/db.py index 5c3b432..3d7af07 100644 --- a/isso/db.py +++ b/isso/db.py @@ -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=?', diff --git a/specs/test_db.py b/specs/test_db.py index 4fc8b97..52351a2 100644 --- a/specs/test_db.py +++ b/specs/test_db.py @@ -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):