Fix db.commit() accidentaly removed from add_comment_to_comment
This commit is contained in:
@@ -161,7 +161,6 @@ class DB:
|
|||||||
def add_comment_to_comment(self, parent_id, author_id, text, time):
|
def add_comment_to_comment(self, parent_id, author_id, text, time):
|
||||||
db = self._db()
|
db = self._db()
|
||||||
c = db.cursor()
|
c = db.cursor()
|
||||||
print(c.lastrowid, parent_id)
|
|
||||||
c.execute('''
|
c.execute('''
|
||||||
insert into comments(thread_id, parent_id, author_id, text, create_time, modify_time)
|
insert into comments(thread_id, parent_id, author_id, text, create_time, modify_time)
|
||||||
select thread_id, ?, ?, ?, ?, ?
|
select thread_id, ?, ?, ?, ?, ?
|
||||||
@@ -170,7 +169,7 @@ class DB:
|
|||||||
''',
|
''',
|
||||||
(parent_id, author_id, text, time, time, parent_id)
|
(parent_id, author_id, text, time, time, parent_id)
|
||||||
)
|
)
|
||||||
print(c.lastrowid)
|
db.commit()
|
||||||
return c.rowcount > 0
|
return c.rowcount > 0
|
||||||
|
|
||||||
def _db(self):
|
def _db(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user