Make the regex for "Save settings for this model" exact
This commit is contained in:
parent
f98fd01dcd
commit
a77965e801
1 changed files with 3 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue