fix(networks): keep reference mtime a datetime for date sort

strptime was handed the stat datetime instead of the date string, so it
always failed and left a raw string mtime; the Date sort then crashed on
mixed str/datetime items. Parse the date string, falling back to stat mtime.
This commit is contained in:
CalamitousFelicitousness
2026-07-03 21:10:50 +01:00
parent 4bdda6d91a
commit 2d5903e91b
+2 -2
View File
@@ -86,9 +86,9 @@ class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage):
mtime = _mtime
else:
try:
mtime = datetime.strptime(_mtime, '%Y %B') # 2025 January
mtime = datetime.strptime(mtime, '%Y %B') # 2025 January
except Exception:
pass
mtime = _mtime
if size == 0:
size = _size
if len(v.get("subfolder", "")) > 0: