Skip to content

Commit 1ec9e90

Browse files
authored
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>
1 parent 0e081ff commit 1ec9e90

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: modules/setting/setting.go

+6
Original file line numberDiff line numberDiff line change
@@ -1190,3 +1190,9 @@ func NewServices() {
11901190
newProject()
11911191
newMimeTypeMap()
11921192
}
1193+
1194+
// NewServicesForInstall initializes the services for install
1195+
func NewServicesForInstall() {
1196+
newService()
1197+
newMailService()
1198+
}

Diff for: routers/install/setting.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func PreloadSettings(ctx context.Context) bool {
2828
log.Info("SQLite3 Supported")
2929
}
3030
setting.InitDBConfig()
31+
setting.NewServicesForInstall()
3132
svg.Init()
3233
}
3334

0 commit comments

Comments
 (0)