From 905e394c5fb2cd386a41b76252dfafb827b34e7a Mon Sep 17 00:00:00 2001 From: Oleg Silkin Date: Wed, 16 Oct 2019 16:53:35 -0400 Subject: [PATCH] Explicitly sets IsHidden flag to 0 when inserting --- src/database/queries.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/database/queries.py b/src/database/queries.py index 7487b6a..7a12793 100644 --- a/src/database/queries.py +++ b/src/database/queries.py @@ -119,10 +119,19 @@ def insert_comment(conn: sqlite3.Connection, claim_id: str, comment: str, parent conn.execute( """ INSERT INTO COMMENT(CommentId, LbryClaimId, ChannelId, Body, ParentId, - Timestamp, Signature, SigningTs) - VALUES (?, ?, ?, ?, ?, ?, ?, ?) - """, - (comment_id, claim_id, channel_id, comment, parent_id, timestamp, signature, signing_ts) + Timestamp, Signature, SigningTs, IsHidden) + VALUES (:comment_id, :claim_id, :channel_id, :comment, :parent_id, + :timestamp, :signature, :signing_ts, 0) """, + { + 'comment_id': comment_id, + 'claim_id': claim_id, + 'channel_id': channel_id, + 'comment': comment, + 'parent_id': parent_id, + 'timestamp': timestamp, + 'signature': signature, + 'signing_ts': signing_ts + } ) logging.info('Inserted Comment into DB, `comment_id`: %s', comment_id) return comment_id