mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Refactor services_service_page to streamline variable handling in raw mode
This commit is contained in:
parent
2db4905297
commit
4b5ef2341f
1 changed files with 6 additions and 6 deletions
|
|
@ -267,13 +267,13 @@ def services_service_page(service: str):
|
|||
if "checksum" in data:
|
||||
db_custom_configs[db_custom_config]["checksum"] = data["checksum"]
|
||||
|
||||
if mode != "easy" or service != "new":
|
||||
if mode == "raw":
|
||||
server_name = variables.get("SERVER_NAME", old_server_name).split(" ")[0]
|
||||
for variable, value in variables.copy().items():
|
||||
if variable.startswith(f"{server_name}_"):
|
||||
variables[variable.replace(f"{server_name}_", "", 1)] = value
|
||||
if mode == "raw":
|
||||
server_name = variables.get("SERVER_NAME", old_server_name).split(" ")[0]
|
||||
for variable, value in variables.copy().items():
|
||||
if variable.startswith(f"{server_name}_"):
|
||||
variables[variable.replace(f"{server_name}_", "", 1)] = value
|
||||
|
||||
if mode != "easy" or service != "new":
|
||||
# Remove already existing fields
|
||||
for variable, value in variables.copy().items():
|
||||
if (mode == "advanced" or variable != "SERVER_NAME") and value == db_config.get(variable, {"value": None})["value"]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue