Skip to content

Commit

Permalink
Cleaner error when no password
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHerve committed Apr 3, 2024
1 parent 5c9d8d5 commit ee73cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/handlers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def delete_room(body):
if not f"instance-{body['instance']}" in pods:
return "Instance " + body["instance"] + " does not exist"

if body["password"] != os.environ["PASSWORD"]:
if "password" not in body or body["password"] != os.environ["PASSWORD"]:
return "Wrong password"

v1.delete_namespaced_pod(namespace=namespace, name='instance-'+body["instance"])
Expand Down

0 comments on commit ee73cd1

Please sign in to comment.