From a77965e801d2966f73b68e98a4b4b8986df21d74 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 12 May 2023 00:43:13 -0300 Subject: [PATCH] Make the regex for "Save settings for this model" exact --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index f00fba0..0332f16 100644 --- a/server.py +++ b/server.py @@ -264,11 +264,12 @@ def save_model_settings(model, state): else: user_config = {} + model_regex = model + '$' # For exact matches if model not in user_config: - user_config[model] = {} + user_config[model_regex] = {} for k in ui.list_model_elements(): - user_config[model][k] = state[k] + user_config[model_regex][k] = state[k] with open(p, 'w') as f: f.write(yaml.dump(user_config))