Fix: failed to get thumbnails under global OneDrive policy

This commit is contained in:
HFO4
2021-03-14 11:03:10 +08:00
parent d1377262e3
commit 170f2279c1
4 changed files with 7 additions and 17 deletions

View File

@@ -186,12 +186,12 @@ func (file *File) Rename(new string) error {
// UpdatePicInfo 更新文件的图像信息
func (file *File) UpdatePicInfo(value string) error {
return DB.Model(&file).Update("pic_info", value).Error
return DB.Model(&file).Set("gorm:association_autoupdate", false).Update("pic_info", value).Error
}
// UpdateSize 更新文件的大小信息
func (file *File) UpdateSize(value uint64) error {
return DB.Model(&file).Update("size", value).Error
return DB.Model(&file).Set("gorm:association_autoupdate", false).Update("size", value).Error
}
// UpdateSourceName 更新文件的源文件名