Modify: disable association_autoupdate in model.File.UpdateSourceName

feat-album
HFO4 3 years ago
parent e2488841b4
commit d9cff24c75

@ -196,7 +196,7 @@ func (file *File) UpdateSize(value uint64) error {
// UpdateSourceName 更新文件的源文件名
func (file *File) UpdateSourceName(value string) error {
return DB.Model(&file).Update("source_name", value).Error
return DB.Model(&file).Set("gorm:association_autoupdate", false).Update("source_name", value).Error
}
/*

Loading…
Cancel
Save