From 536fdecb679caf27aa61c0fef07297cbc5f5509a Mon Sep 17 00:00:00 2001 From: BennyKok Date: Mon, 25 Dec 2023 19:03:02 +0800 Subject: [PATCH] fix(plugin): normal queue will crash due to key not found --- custom_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_routes.py b/custom_routes.py index b120033..1297c67 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -280,7 +280,7 @@ async def upload_file(prompt_id, filename, subfolder=None, content_type="image/p print("upload file response", response.status_code) def have_pending_upload(prompt_id): - if 'uploading_nodes' in prompt_metadata[prompt_id] and len(prompt_metadata[prompt_id]['uploading_nodes']) > 0: + if 'prompt_id' in prompt_metadata and 'uploading_nodes' in prompt_metadata[prompt_id] and len(prompt_metadata[prompt_id]['uploading_nodes']) > 0: return True return False