From 91c3b8215208e50eb51b04f7107f21762dd8f66d Mon Sep 17 00:00:00 2001 From: autocommit Date: Mon, 1 Jun 2020 02:45:41 +0000 Subject: [PATCH] The template prints out the root by itself Right, the template is where the duplication of the root is, since now the root is just the first "descendant" in the tree. --- brutaldon/threadtree.py | 1 - brutaldon/views.py | 1 - 2 files changed, 2 deletions(-) diff --git a/brutaldon/threadtree.py b/brutaldon/threadtree.py index 165b9d7..a9cc416 100644 --- a/brutaldon/threadtree.py +++ b/brutaldon/threadtree.py @@ -29,7 +29,6 @@ def maketree(mastodon, root, descendants): descendant.in_reply_to_id, descendant.in_reply_to_account_id) seen = set() - seen.add(root.id) def onelevel(reps): for rep in sorted(reps): if rep in seen: continue diff --git a/brutaldon/views.py b/brutaldon/views.py index 765f29e..ea6e41f 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -699,7 +699,6 @@ def thread(request, id): { "context": context, "toot": toot, - "root": root, "toots": toots, "own_acct": request.session["active_user"], "notifications": notifications,