Fix allow empty values when saving a config in web UI

This commit is contained in:
Théophile Diot 2023-10-17 12:08:59 +02:00
parent 22552c5b85
commit 530b8a945d
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -491,7 +491,7 @@ def services():
elif value == "off":
value = "no"
if variable in variables and (variable != "SERVER_NAME" and value == config.get(variable, None) or not value.strip()):
if variable in variables and variable != "SERVER_NAME" and value == config.get(variable, None):
del variables[variable]
if request.form["operation"] == "edit" and len(variables) == 1 and "SERVER_NAME" in variables and variables["SERVER_NAME"] == request.form.get("OLD_SERVER_NAME", ""):