diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-31 01:54:16 +0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-30 13:54:16 -0400 |
commit | 651dd33b29b7b8b296cc5a12479684fa836867b1 (patch) | |
tree | 60d4f385f50ab7f6b8aa75bdb6de2d98508c8784 /store/sql_preference_store.go | |
parent | 4c1f4674425ffeb430aa07f3fccbb09837f36a34 (diff) | |
download | chat-651dd33b29b7b8b296cc5a12479684fa836867b1.tar.gz chat-651dd33b29b7b8b296cc5a12479684fa836867b1.tar.bz2 chat-651dd33b29b7b8b296cc5a12479684fa836867b1.zip |
set to default value with config is missing (#7320)
Diffstat (limited to 'store/sql_preference_store.go')
-rw-r--r-- | store/sql_preference_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_preference_store.go b/store/sql_preference_store.go index 5d94f2477..e008e05eb 100644 --- a/store/sql_preference_store.go +++ b/store/sql_preference_store.go @@ -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 |