From 1e6dddc0b06934e64c92dbc33c4e648b3a838221 Mon Sep 17 00:00:00 2001 From: timerzz Date: Thu, 5 Sep 2024 21:11:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=20article=20update=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/article.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs/storage/article.go b/structs/storage/article.go index ae51ef3..a904918 100644 --- a/structs/storage/article.go +++ b/structs/storage/article.go @@ -53,7 +53,7 @@ func (a *articleApi) Update(article v2.Article, selects ...string) error { if len(selects) > 0 { selects = []string{"remark", "exclude"} } - return a.db.Model(&article).Select(selects).Updates(article).Error + return a.db.Model(&article).Select(selects).Omit(clause.Associations).Updates(article).Error } // ******************Findĺ’ŚList