Migrate User.InferSystemInstallDate to sync by default (#11505)
* Migrate User.InferSystemInstallDate to sync by default * Change var name
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
7663c5b00e
Коммит
e908165fe3
@@ -243,10 +243,10 @@ func (a *App) ensureInstallationDate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
result := <-a.Srv.Store.User().InferSystemInstallDate()
|
||||
installDate, err := a.Srv.Store.User().InferSystemInstallDate()
|
||||
var installationDate int64
|
||||
if result.Err == nil && result.Data.(int64) > 0 {
|
||||
installationDate = result.Data.(int64)
|
||||
if err == nil && installDate > 0 {
|
||||
installationDate = installDate
|
||||
} else {
|
||||
installationDate = utils.MillisFromTime(time.Now())
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user