mirror of
https://github.com/idrirap/ComfyUI-Lora-Auto-Trigger-Words.git
synced 2026-03-21 21:22:12 -03:00
don't delete loras_tags.json on JSONDecodeError
This commit is contained in:
4
utils.py
4
utils.py
@@ -66,7 +66,7 @@ def load_json_from_file(file_path):
|
|||||||
return None
|
return None
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
print(f"Error decoding JSON in file: {file_path}")
|
print(f"Error decoding JSON in file: {file_path}")
|
||||||
return None
|
raise
|
||||||
|
|
||||||
def save_dict_to_json(data_dict, file_path):
|
def save_dict_to_json(data_dict, file_path):
|
||||||
try:
|
try:
|
||||||
@@ -219,4 +219,4 @@ def append_lora_name_if_empty(tags_list, lora_path, enabled):
|
|||||||
filename = os.path.basename(filename)
|
filename = os.path.basename(filename)
|
||||||
|
|
||||||
tags_list.append(filename)
|
tags_list.append(filename)
|
||||||
return tags_list
|
return tags_list
|
||||||
|
|||||||
Reference in New Issue
Block a user