aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images_history.py
diff options
context:
space:
mode:
authoryfszzx <yfszzx@gmail.com>2022-10-17 15:04:42 +0000
committeryfszzx <yfszzx@gmail.com>2022-10-17 15:04:42 +0000
commit2272cf2f35fafd5cd486bfb4ee89df5bbc625b97 (patch)
treeb52f1f5657ffebb06e3bf550207301ace63b1d66 /modules/images_history.py
parentde179cf8fd8191e1a6d288e7c29a16f53da1be88 (diff)
downloadstable-diffusion-webui-gfx803-2272cf2f35fafd5cd486bfb4ee89df5bbc625b97.tar.gz
stable-diffusion-webui-gfx803-2272cf2f35fafd5cd486bfb4ee89df5bbc625b97.tar.bz2
stable-diffusion-webui-gfx803-2272cf2f35fafd5cd486bfb4ee89df5bbc625b97.zip
fix two bug
Diffstat (limited to 'modules/images_history.py')
-rw-r--r--modules/images_history.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/images_history.py b/modules/images_history.py
index 10e5b970..1c1790a4 100644
--- a/modules/images_history.py
+++ b/modules/images_history.py
@@ -133,7 +133,7 @@ def archive_images(dir_name, date_to):
date = sort_array[loads_num][2]
filenames = [x[1] for x in sort_array]
else:
- date = sort_array[-1][2]
+ date = None if len(sort_array) == 0 else sort_array[-1][2]
filenames = [x[1] for x in sort_array]
filenames = [x[1] for x in sort_array if x[2]>= date]
_, image_list, _, visible_num = get_recent_images(1, 0, filenames)