diff options
Diffstat (limited to 'backend')
| -rwxr-xr-x | backend/data/genLinkedImgs.py | 4 | ||||
| -rwxr-xr-x | backend/server.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/backend/data/genLinkedImgs.py b/backend/data/genLinkedImgs.py index bcc91c5..3f32d16 100755 --- a/backend/data/genLinkedImgs.py +++ b/backend/data/genLinkedImgs.py @@ -89,13 +89,13 @@ for nodeName in processedNodes.keys(): if match != None: # Replace associated image with subname images (subName1, subName2) = match.group(1,2) - otolIdPair = [0, 0] + otolIdPair = [None, None] if subName1 in processedNodes: otolIdPair[0] = processedNodes[subName1] if subName2 in processedNodes: otolIdPair[1] = processedNodes[subName2] # Use no image if both subimages not found - if otolIdPair[0] == 0 and otolIdPair[1] == 0: + if otolIdPair[0] == None and otolIdPair[1] == None: dbCur.execute("DELETE FROM linked_imgs WHERE name = ?", (nodeName,)) continue # Add to db diff --git a/backend/server.py b/backend/server.py index 7d11bc4..2212b13 100755 --- a/backend/server.py +++ b/backend/server.py @@ -68,8 +68,8 @@ def lookupNodes(names, useReducedTree): nodeObjs[name]["imgName"] = otolId + ".jpg" else: nodeObjs[name]["imgName"] = [ - otolId + ".jpg" if otolId != 0 else None, - otolId2 + ".jpg" if otolId2 != 0 else None, + otolId + ".jpg" if otolId != None else None, + otolId2 + ".jpg" if otolId2 != None else None, ] # Get preferred-name info query = f"SELECT name, alt_name FROM names WHERE pref_alt = 1 AND name IN ({queryParamStr})" |
