From 1f583d2ef1b7104607bdbeecb425d22ee8af1fc4 Mon Sep 17 00:00:00 2001 From: bezo97 Date: Sat, 28 Dec 2024 01:15:26 +0100 Subject: [PATCH] account for multiple custom_nodes paths --- app/custom_node_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/custom_node_manager.py b/app/custom_node_manager.py index f315d3ca9..32f15aa99 100644 --- a/app/custom_node_manager.py +++ b/app/custom_node_manager.py @@ -15,7 +15,11 @@ class CustomNodeManager: @routes.get("/workflow_templates") async def get_workflow_templates(request): """Returns a web response that contains the map of custom_nodes names and their associated workflow templates. The ones without templates are omitted.""" - files = glob.glob(os.path.join(folder_paths.get_folder_paths("custom_nodes")[0], '*/example_workflows/*.json')) + files = [ + file + for folder in folder_paths.get_folder_paths("custom_nodes") + for file in glob.glob(os.path.join(folder, '*/example_workflows/*.json')) + ] workflow_templates_dict = {} # custom_nodes folder name -> example workflow names for file in files: custom_nodes_name = os.path.basename(os.path.dirname(os.path.dirname(file)))