Fix bugs in image subdir logic (#1108)

This commit is contained in:
Daniel Markstedt 2023-02-26 14:15:13 -08:00 committed by GitHub
parent dd00547f92
commit 1082b6a7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -367,9 +367,7 @@
{% endfor %}
</tbody>
</table>
{% if subdir != "/" %}
</details>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -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]