Skip to content

Commit

Permalink
Fix server name validation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheophileDiot committed Nov 28, 2023
1 parent 53706a7 commit 1daa410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def setup():
error = True
else:
for server_name in server_names:
if request.form["server_name"] in db_config[f"{server_name}_SERVER_NAME"].split(" "):
if request.form["server_name"] in db_config.get(f"{server_name}_SERVER_NAME", "").split(" "):
flash(f"The hostname {request.form['server_name']} is already in use.", "error")
error = True
break
Expand Down

0 comments on commit 1daa410

Please sign in to comment.