From 9cf5c5f23f6c72a480d03401adb9d2f3071e6fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Mon, 18 Aug 2025 18:35:40 +0200 Subject: [PATCH] Fixed bug in tree query with bootstrapped database --- node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.go b/node.go index 2bf6302..39ac133 100644 --- a/node.go +++ b/node.go @@ -149,7 +149,7 @@ func GetNodeTree(startNodeID, maxDepth int, withData bool) (topNode *Node, err e n.id, ns.depth+1 AS depth FROM node n - INNER JOIN nodes ns ON ns.depth < $2 AND n.parent_id = ns.id + INNER JOIN nodes ns ON ns.depth < $2 AND n.parent_id = ns.id AND n.id != ns.id ) SEARCH DEPTH FIRST BY id SET ordercol