Skip to content

Commit

Permalink
Ensure settings for Service and Mailer are read on the install page (g…
Browse files Browse the repository at this point in the history
…o-gitea#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 go-gitea#15894

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

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath authored and AbdulrhmnGhanem committed Aug 10, 2021
1 parent 5b209fa commit 5b6644a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -1190,3 +1190,9 @@ func NewServices() {
newProject()
newMimeTypeMap()
}

// NewServicesForInstall initializes the services for install
func NewServicesForInstall() {
newService()
newMailService()
}
1 change: 1 addition & 0 deletions routers/install/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func PreloadSettings(ctx context.Context) bool {
log.Info("SQLite3 Supported")
}
setting.InitDBConfig()
setting.NewServicesForInstall()
svg.Init()
}

Expand Down

0 comments on commit 5b6644a

Please sign in to comment.