Skip to content

Commit 2b1be19

Browse files
committed
add uuid
1 parent 5880e87 commit 2b1be19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

coderbot/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ def saveProgram(id, body):
294294
overwrite = body.get("overwrite")
295295
name = body["name"]
296296
existing_program = prog_engine.load(id)
297+
if existing_program is None:
298+
return {}, 404
297299
logging.info("saving - id: %s - name: %s - existing: %s", id, name, str(existing_program is not None))
298300
if existing_program is not None and existing_program.is_stock() == True:
299301
return "defaultCannotOverwrite", 400

0 commit comments

Comments
 (0)