🐛 Fix panic

This commit is contained in:
LittleSheep 2025-02-22 12:34:40 +08:00
parent 0913521c13
commit cfd1735aee

View File

@ -97,7 +97,7 @@ func GetAttachmentCache(rid string) (models.Attachment, bool) {
GetAttachmentCacheKey(rid),
new(models.Attachment),
); err == nil {
return val.(models.Attachment), true
return *val.(*models.Attachment), true
}
return models.Attachment{}, false
}