set to default value with config is missing (#7320)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
4c1f467442
Коммит
651dd33b29
@@ -110,7 +110,7 @@ func (s SqlPreferenceStore) save(transaction *gorp.Transaction, preference *mode
|
||||
"Value": preference.Value,
|
||||
}
|
||||
|
||||
if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL {
|
||||
if *utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL {
|
||||
if _, err := transaction.Exec(
|
||||
`INSERT INTO
|
||||
Preferences
|
||||
@@ -121,7 +121,7 @@ func (s SqlPreferenceStore) save(transaction *gorp.Transaction, preference *mode
|
||||
Value = :Value`, params); err != nil {
|
||||
result.Err = model.NewLocAppError("SqlPreferenceStore.save", "store.sql_preference.save.updating.app_error", nil, err.Error())
|
||||
}
|
||||
} else if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
|
||||
} else if *utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
|
||||
// postgres has no way to upsert values until version 9.5 and trying inserting and then updating causes transactions to abort
|
||||
count, err := transaction.SelectInt(
|
||||
`SELECT
|
||||
|
||||
Ссылка в новой задаче
Block a user