Fixing LDAP issue with Postgres (#3033)

Этот коммит содержится в:
Corey Hulen
2016-05-17 12:52:10 -07:00
коммит произвёл Christopher Speller
родитель d2b556aa77
Коммит 123bfad69c
6 изменённых файлов: 27 добавлений и 12 удалений

Просмотреть файл

@@ -155,7 +155,7 @@ func (s SqlPreferenceStore) insert(transaction *gorp.Transaction, preference *mo
result := StoreResult{}
if err := transaction.Insert(preference); err != nil {
if IsUniqueConstraintError(err.Error(), "UserId", "preferences_pkey") {
if IsUniqueConstraintError(err.Error(), []string{"UserId", "preferences_pkey"}) {
result.Err = model.NewLocAppError("SqlPreferenceStore.insert", "store.sql_preference.insert.exists.app_error", nil,
"user_id="+preference.UserId+", category="+preference.Category+", name="+preference.Name+", "+err.Error())
} else {