fix: resolve broken imports and argument mismatch in API handlers
- Move utils imports to module-level with try/except for relative (ComfyUI) and absolute (test runner) import contexts in prompts.py. Fixes 500 errors on rating update, prompt save, and prompt edit. - Add missing None for rating parameter in image scan's save_prompt call, which was passing the notes string as rating causing a type comparison error during image scanning.
This commit is contained in:
@@ -1065,6 +1065,7 @@ class AdminRoutesMixin:
|
||||
prompt_text.strip(),
|
||||
"scanned",
|
||||
["auto-scanned"],
|
||||
None,
|
||||
f"Auto-scanned from {os.path.basename(png_file)}",
|
||||
prompt_hash,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user