Skip to content

Commit

Permalink
Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
bkis committed Aug 21, 2023
1 parent 8cf249c commit 28d3e30
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tekst-API/tekst/routers/browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ async def get_path_options_by_head_id(
# construct options for this path up to root node
options = []
while node_doc and node_doc.parent_id:
siblings = await NodeDocument.find(NodeDocument.parent_id == node_doc.parent_id).to_list()
siblings = await NodeDocument.find(
NodeDocument.parent_id == node_doc.parent_id
).to_list()
options.insert(0, siblings)
node_doc = await NodeDocument.get(node_doc.parent_id)
# lastly, insert options for root level
Expand Down Expand Up @@ -161,7 +163,9 @@ async def get_path_options_by_root_id(
# construct options for this path up to max_level
options = []
while node_doc:
children = await NodeDocument.find(NodeDocument.parent_id == node_doc.id).to_list()
children = await NodeDocument.find(
NodeDocument.parent_id == node_doc.id
).to_list()
if len(children) == 0:
break
options.append(children)
Expand Down

0 comments on commit 28d3e30

Please sign in to comment.