fix: fetch active project in hold_config when project_name is empty
Hidden widgets aren't serialized by ComfyUI on queue, so project_name arrives empty. Fall back to /api/active-project directly from Python. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -235,7 +235,13 @@ class ProjectSource:
|
|||||||
OUTPUT_NODE = True
|
OUTPUT_NODE = True
|
||||||
|
|
||||||
def hold_config(self, manager_url, project_name, file_name, sequence_number, label):
|
def hold_config(self, manager_url, project_name, file_name, sequence_number, label):
|
||||||
proj = _fetch_project(manager_url, project_name)
|
name = project_name.strip()
|
||||||
|
if not name:
|
||||||
|
active = _fetch_json(f"{manager_url.rstrip('/')}/api/active-project")
|
||||||
|
name = active.get("project", "") if "error" not in active else ""
|
||||||
|
folder_path = ""
|
||||||
|
if name:
|
||||||
|
proj = _fetch_project(manager_url, name)
|
||||||
folder_path = proj.get("folder_path", "") if "error" not in proj else ""
|
folder_path = proj.get("folder_path", "") if "error" not in proj else ""
|
||||||
if folder_path and not folder_path.endswith("/"):
|
if folder_path and not folder_path.endswith("/"):
|
||||||
folder_path += "/"
|
folder_path += "/"
|
||||||
|
|||||||
Reference in New Issue
Block a user