From 5d1c0db2529cd3ceda063d69e7d748fdbcd61858 Mon Sep 17 00:00:00 2001 From: yuanjiawei Date: Tue, 29 Oct 2024 15:59:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E5=AE=A1=E6=89=B9=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqle/model/configuration.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqle/model/configuration.go b/sqle/model/configuration.go index 5c88c34a7..c35b8be99 100644 --- a/sqle/model/configuration.go +++ b/sqle/model/configuration.go @@ -185,7 +185,8 @@ func (s *Storage) GetAllIMConfig() ([]IM, error) { } func (s *Storage) UpdateImConfigById(id uint, m map[string]interface{}) error { - err := s.db.Model(&IM{}).Where("id = ?", id).Updates(m).Error + // 这里使用UpdateColumns可以不触发hook + err := s.db.Model(&IM{}).Where("id = ?", id).UpdateColumns(m).Error if err != nil { return errors.New(errors.ConnectStorageError, err) }