From f99b6f34ffb18a88bf6294124f015eff53e4afdf Mon Sep 17 00:00:00 2001 From: BennyKok Date: Fri, 12 Jan 2024 19:42:50 +0800 Subject: [PATCH] fix: safety check with when prompt has not yet running --- custom_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_routes.py b/custom_routes.py index bb12448..90c0b40 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -170,7 +170,7 @@ async def websocket_handler(request): async def comfy_deploy_check_status(request): prompt_server = server.PromptServer.instance prompt_id = request.rel_url.query.get('prompt_id', None) - if prompt_id in prompt_metadata: + if prompt_id in prompt_metadata and 'status' in prompt_metadata[prompt_id]: return web.json_response({ "status": prompt_metadata[prompt_id]['status'].value })