Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions models/system/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func GetSetting(key string) (*Setting, error) {

// GetSettings returns specific settings
func GetSettings(keys []string) (map[string]*Setting, error) {
if db.DefaultContext == nil {
return map[string]*Setting{}, nil
}

for i := 0; i < len(keys); i++ {
keys[i] = strings.ToLower(keys[i])
}
Expand Down
1 change: 0 additions & 1 deletion routers/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ func SubmitInstall(ctx *context.Context) {
ctx.RenderWithErr(ctx.Tr("install.invalid_db_setting", err), tplInstall, &form)
return
}
db.UnsetDefaultEngine()
Copy link
Member Author

@a1012112796 a1012112796 Oct 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woder why unset? is it necessary? how about move it to line 583 (before srv.Shutdown() ). thanks


// Save settings.
cfg := ini.Empty()
Expand Down