diff --git a/core/config/backend_config.go b/core/config/backend_config.go index 7d04996a..cba85640 100644 --- a/core/config/backend_config.go +++ b/core/config/backend_config.go @@ -400,6 +400,15 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) { cfg.Debug = &trueV } + if len(cfg.KnownUsecaseStrings) == 0 { + // Infer use case if not provided + for k, usecase := range GetAllBackendConfigUsecases() { + if cfg.HasUsecases(usecase) { + cfg.KnownUsecaseStrings = append(cfg.KnownUsecaseStrings, k) + } + } + } + guessDefaultsFromFile(cfg, lo.modelPath) } diff --git a/core/http/views/index.html b/core/http/views/index.html index f4666b43..143a7b36 100644 --- a/core/http/views/index.html +++ b/core/http/views/index.html @@ -29,7 +29,7 @@ {{ range .Models }}