From 2b1be1954497dbb2f0816936ce7e2327d0d24a8e Mon Sep 17 00:00:00 2001 From: previ Date: Thu, 28 Dec 2023 23:53:27 +0000 Subject: [PATCH] add uuid --- coderbot/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coderbot/api.py b/coderbot/api.py index 8569f869..a0b900d8 100644 --- a/coderbot/api.py +++ b/coderbot/api.py @@ -294,6 +294,8 @@ def saveProgram(id, body): overwrite = body.get("overwrite") name = body["name"] existing_program = prog_engine.load(id) + if existing_program is None: + return {}, 404 logging.info("saving - id: %s - name: %s - existing: %s", id, name, str(existing_program is not None)) if existing_program is not None and existing_program.is_stock() == True: return "defaultCannotOverwrite", 400