From 1082b6a7b49a232e0e159a44820c9fea1143e6ac Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sun, 26 Feb 2023 14:15:13 -0800 Subject: [PATCH] Fix bugs in image subdir logic (#1108) --- python/web/src/templates/index.html | 2 -- python/web/src/web_utils.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html index ae4e4dc2..8ab45539 100644 --- a/python/web/src/templates/index.html +++ b/python/web/src/templates/index.html @@ -367,9 +367,7 @@ {% endfor %} -{% if subdir != "/" %} -{% endif %} {% endfor %} {% endif %} diff --git a/python/web/src/web_utils.py b/python/web/src/web_utils.py index e007619f..3cf71b3e 100644 --- a/python/web/src/web_utils.py +++ b/python/web/src/web_utils.py @@ -161,7 +161,7 @@ def format_image_list(image_files, device_types=None): subdir_path = findall("^.*/", image["name"]) if subdir_path: subdir = subdir_path[0] - if subdir in subdir_image_files.keys(): + if f"images/{subdir}" in subdir_image_files.keys(): subdir_image_files[f"images/{subdir}"].append(image) else: subdir_image_files[f"images/{subdir}"] = [image]