aboutsummaryrefslogtreecommitdiff
path: root/backend/data
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-15 21:22:44 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-15 21:22:44 +1000
commite25deb5fd30981b6558a09efc47a6defeb9cf0a1 (patch)
treeb807d67bc72b8e00899cd5fed0ceba4052ac8f48 /backend/data
parenteabec97d80e5f43e4710dd4c8327d0bc8519ab8c (diff)
In the reduced-tree, prefer additional-children with images
Diffstat (limited to 'backend/data')
-rwxr-xr-xbackend/data/genReducedTreeData.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/data/genReducedTreeData.py b/backend/data/genReducedTreeData.py
index 7dc3acc..ba223b0 100755
--- a/backend/data/genReducedTreeData.py
+++ b/backend/data/genReducedTreeData.py
@@ -119,7 +119,7 @@ for (name, nodeObj) in nodeMap.items():
children = [row[0] for row in dbCur.execute("SELECT child FROM edges where node = ?", (name,))]
newChildren = [n for n in children if
not (n in nodeMap or n in namesToRemove) and
- compNameRegex.fullmatch(n) == None]
+ dbCur.execute("SELECT name from node_imgs WHERE name = ?", (n,)).fetchone() != None]
newChildNames = newChildren[:max(0, PREF_NUM_CHILDREN - numChildren)]
nodeObj["children"].extend(newChildNames)
namesToAdd.extend(newChildNames)