Ensure settings for Service and Mailer are read on the install page (#15943)

* Ensure settings for Service and Mailer are read on the install page

NewContext does not set the mailer or service settings so add
a new function that will run this.

Fix #15894

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
tokarchuk/v1.17
zeripath 3 years ago committed by GitHub
parent 0e081ff0ce
commit 1ec9e906dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/setting/setting.go
  2. 1
      routers/install/setting.go

@ -1190,3 +1190,9 @@ func NewServices() {
newProject()
newMimeTypeMap()
}
// NewServicesForInstall initializes the services for install
func NewServicesForInstall() {
newService()
newMailService()
}

@ -28,6 +28,7 @@ func PreloadSettings(ctx context.Context) bool {
log.Info("SQLite3 Supported")
}
setting.InitDBConfig()
setting.NewServicesForInstall()
svg.Init()
}

Loading…
Cancel
Save