aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-24 13:04:46 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-24 13:04:46 +1000
commit5b3fcc397cf87ef4f484a01e3fc00f4e18b6f6da (patch)
tree99a87f099309109845be0c327ee919c5a85c5f7b /backend
parent7035e4bc55acc9471de8c5b02c3655d5f188a320 (diff)
For compound-nodes without sub-images, don't use a child image
Diffstat (limited to 'backend')
-rwxr-xr-xbackend/data/genLinkedImgs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/data/genLinkedImgs.py b/backend/data/genLinkedImgs.py
index 53a59eb..2e3fdce 100755
--- a/backend/data/genLinkedImgs.py
+++ b/backend/data/genLinkedImgs.py
@@ -96,8 +96,9 @@ for nodeName in processedNodes.keys():
eolIdPair[0] = processedNodes[subName1]
if subName2 in processedNodes:
eolIdPair[1] = processedNodes[subName2]
- # Skip if both subimages not found
+ # Use no image if both subimages not found
if eolIdPair[0] == 0 and eolIdPair[1] == 0:
+ dbCur.execute("DELETE FROM linked_imgs WHERE name = ?", (nodeName,))
continue
# Add to db
dbCur.execute("UPDATE linked_imgs SET eol_id = ?, eol_id2 = ? WHERE name = ?",