🐛 Fix cache issue

This commit is contained in:
2024-12-29 01:03:22 +08:00
parent b041ce3e06
commit e89f149336
6 changed files with 28 additions and 14 deletions

View File

@@ -226,7 +226,6 @@ func AnalyzeAttachment(file models.Attachment) error {
if linked && err != nil {
return fmt.Errorf("unable to link file record: %v", err)
} else if !linked {
CacheAttachment(file)
if err := tx.Save(&file).Error; err != nil {
tx.Rollback()
return fmt.Errorf("unable to save file record: %v", err)