don't delete loras_tags.json on JSONDecodeError

This commit is contained in:
Dustin Pfeiffer
2024-02-23 15:28:01 -08:00
committed by GitHub
parent 517b8a8a12
commit 5b5eaf3a81

View File

@@ -66,7 +66,7 @@ def load_json_from_file(file_path):
return None
except json.JSONDecodeError:
print(f"Error decoding JSON in file: {file_path}")
return None
raise
def save_dict_to_json(data_dict, file_path):
try:
@@ -219,4 +219,4 @@ def append_lora_name_if_empty(tags_list, lora_path, enabled):
filename = os.path.basename(filename)
tags_list.append(filename)
return tags_list
return tags_list