From 66a4d0112587608533aa744578d2db18bd88db56 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 6 Sep 2017 14:00:56 -0400 Subject: Update IsUniqueConstraint to check error codes instead of message text (#7385) --- store/sql_supplier_reactions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'store/sql_supplier_reactions.go') diff --git a/store/sql_supplier_reactions.go b/store/sql_supplier_reactions.go index 30ca6beed..52697204c 100644 --- a/store/sql_supplier_reactions.go +++ b/store/sql_supplier_reactions.go @@ -38,7 +38,7 @@ func (s *SqlSupplier) ReactionSave(ctx context.Context, reaction *model.Reaction transaction.Rollback() // We don't consider duplicated save calls as an error - if !IsUniqueConstraintError(err.Error(), []string{"reactions_pkey", "PRIMARY"}) { + if !IsUniqueConstraintError(err, []string{"reactions_pkey", "PRIMARY"}) { result.Err = model.NewLocAppError("SqlPreferenceStore.Save", "store.sql_reaction.save.save.app_error", nil, err.Error()) } } else { -- cgit v1.2.3-1-g7c22