Refactor variable deletion in main.py in web UI to fix potential keys missing

This commit is contained in:
Théophile Diot 2024-04-23 12:43:44 +02:00
parent 38c0e55d33
commit 9c1af9b766
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -903,8 +903,8 @@ def services():
del variables["csrf_token"]
# Delete custom client variables
del variables["SECURITY_LEVEL"]
del variables["mode"]
variables.pop("SECURITY_LEVEL", None)
variables.pop("mode", None)
is_draft = variables.pop("is_draft", "no") == "yes"