Skip to content

Commit

Permalink
add uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
previ committed Dec 28, 2023
1 parent 5880e87 commit 2b1be19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coderbot/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b1be19

Please sign in to comment.