fix: keep update at column when rename

This commit is contained in:
vvisionnn
2022-04-25 20:23:53 +08:00
parent dc69a63217
commit 2dcf1664a6
5 changed files with 54 additions and 18 deletions

View File

@@ -266,7 +266,7 @@ func GetFilesByUploadSession(sessionID string, uid uint) (*File, error) {
// Rename 重命名文件
func (file *File) Rename(new string) error {
return DB.Model(&file).Update("name", new).Error
return DB.Model(&file).UpdateColumn("name", new).Error
}
// UpdatePicInfo 更新文件的图像信息