From 95976a9d4f195087e21a3cd5cfa3db9f3d61be3d Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 22 Sep 2023 06:02:34 -0700 Subject: [PATCH] Fix a bug while deleting characters --- modules/ui_file_saving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_file_saving.py b/modules/ui_file_saving.py index 9febd296..d80378af 100644 --- a/modules/ui_file_saving.py +++ b/modules/ui_file_saving.py @@ -57,7 +57,7 @@ def create_event_handlers(): shared.gradio['delete_character_confirm'].click( chat.delete_character, gradio('character_menu'), None).then( lambda: gr.update(visible=False), None, gradio('character_deleter')).then( - lambda: gr.update(choices=utils.get_available_characters(), value="None"), None, gradio('character_menu')) + lambda: gr.update(choices=(characters := utils.get_available_characters()), value=characters[0]), None, gradio('character_menu')) shared.gradio['save_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_saver')) shared.gradio['delete_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_deleter'))