fix initial user setting initialization
This commit is contained in:
parent
4bd5248cdd
commit
20a14aa0c0
@ -251,6 +251,7 @@ func (app *application) putUserSettings(w http.ResponseWriter, r *http.Request)
|
||||
if !form.Valid() {
|
||||
// TODO: rerender template with errors
|
||||
app.clientError(w, http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
user.Settings.LocalTimezone, err = time.LoadLocation(form.LocalTimezone)
|
||||
if err != nil {
|
||||
|
||||
@ -313,6 +313,10 @@ func runInstaller(i *appInstaller) error {
|
||||
if installed {
|
||||
return nil
|
||||
}
|
||||
err = i.app.users.InitializeSettingsMap()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
i.app.logger.Info("App not installed, running installer...")
|
||||
i.app.logger.Info("Starting installation server", slog.Any("addr", i.srv.Addr))
|
||||
if i.app.debug {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user