fix crash when editing name of model

- fixes a spurious "unknown model name" error when trying to edit the
  short name of an existing model.
- relaxes naming requirements to include the ':' and '/' characters
  in model names
This commit is contained in:
Lincoln Stein
2023-01-31 09:59:58 -05:00
parent 371edc993a
commit fc8e3dbcd3
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ class ModelManager(object):
Set the default model. The change will not take
effect until you call model_manager.commit()
'''
assert model_name in self.models,f"unknown model '{model_name}'"
assert model_name in self.model_names(), f"unknown model '{model_name}'"
config = self.config
for model in config: