feat article update排除关联

This commit is contained in:
timerzz 2024-09-05 21:13:50 +08:00
parent 1e6dddc0b0
commit c617344e33

View File

@ -51,7 +51,7 @@ func (a *articleApi) Upsert(article v2.Article) error {
func (a *articleApi) Update(article v2.Article, selects ...string) error {
if len(selects) > 0 {
selects = []string{"remark", "exclude"}
selects = []string{"Remark", "Exclude"}
}
return a.db.Model(&article).Select(selects).Omit(clause.Associations).Updates(article).Error
}