forked from LBRYCommunity/lbry-sdk
added IGNORE to insert into trend query
This commit is contained in:
parent
8a5b803788
commit
82f2ad21e1
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ def calculate_trending(db, height, is_first_sync, final_height):
|
|||
|
||||
start = (height-TRENDING_WINDOW)+1
|
||||
db.execute(f"""
|
||||
INSERT INTO trend (claim_hash, height, amount)
|
||||
INSERT OR IGNORE INTO trend (claim_hash, height, amount)
|
||||
SELECT claim_hash, {start}, COALESCE(
|
||||
(SELECT SUM(amount) FROM support WHERE claim_hash=claim.claim_hash
|
||||
AND height >= {start}), 0
|
||||
|
|
Loading…
Reference in a new issue