From dcfd24cf3b6f88a9a32493ded9f1b8b60c453947 Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Thu, 4 Aug 2022 17:15:19 -0400 Subject: [PATCH] Fixup building tree of PR contents --- src/timessquare/storage/page.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/timessquare/storage/page.py b/src/timessquare/storage/page.py index 792c60d0..c125fb89 100644 --- a/src/timessquare/storage/page.py +++ b/src/timessquare/storage/page.py @@ -335,10 +335,10 @@ async def get_github_pr_tree( # Create a root node for the repo to use its insert_input method # for sorting the tree and creating directories as needed - repo_node = GitHubNode( - node_type=GitHubNodeType.repo, title=repo, path="", contents=[] + owner_node = GitHubNode( + node_type=GitHubNodeType.owner, title=repo, path=owner, contents=[] ) for tree_input in tree_inputs: - repo_node.insert_input(tree_input) + owner_node.insert_input(tree_input) - return repo_node.contents + return owner_node.contents[0].contents