From 88394c7d829c5e25be56f3efffbc9805b64736a5 Mon Sep 17 00:00:00 2001 From: mia Date: Wed, 20 Nov 2024 06:52:59 -0800 Subject: changes and alterations --- 2_filter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '2_filter.py') diff --git a/2_filter.py b/2_filter.py index 89311d2..62ca8e3 100644 --- a/2_filter.py +++ b/2_filter.py @@ -17,12 +17,12 @@ intermediate = parse_graph() def transform(entry: dict) -> FilterableNote: time.sleep(0.0001) note = conn.execute( - 'select "createdAt", reactions, "renoteCount", visibility from note where id = %s', + 'select "createdAt", reactions, "renoteCount", visibility, cw from note where id = %s', [entry["id"]], ).fetchone() if note is None: return None # part of thread disappeared during processing - when, reactions, renotes, visibility = note + when, reactions, renotes, visibility, cw = note replies = [transform(intermediate[reply]) for reply in entry["replies"]] quotes = [transform(intermediate[quote]) for quote in entry["quotes"]] @@ -38,6 +38,7 @@ def transform(entry: dict) -> FilterableNote: sum(reactions.values()), renotes, Visibility.from_db(visibility), + cw, ) -- cgit 1.4.1