fix control gallery selector

This commit is contained in:
Vladimir Mandic
2024-05-17 13:24:51 -04:00
parent 2aadaa3923
commit 2165a30f2d
3 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -641,7 +641,9 @@ def create_ui(container, button_parent, tabname, skip_indexing = False):
def fn_save_img(image):
if ui.last_item is None or ui.last_item.local_preview is None:
return 'html/card-no-preview.png'
images = list(ui.gallery.temp_files) # gallery cannot be used as input component so looking at most recently registered temp files
images = []
if ui.gallery is not None:
images = list(ui.gallery.temp_files) # gallery cannot be used as input component so looking at most recently registered temp files
if len(images) < 1:
shared.log.warning(f'Extra network no image: item={ui.last_item.name}')
return 'html/card-no-preview.png'