From 03f08f1ff631a5d1fe2cc52424b0de24f6800351 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 31 Jul 2024 15:11:15 +0800 Subject: [PATCH] :bug: Fix get cannot get other attachment userinfo --- pkg/internal/services/attachments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/services/attachments.go b/pkg/internal/services/attachments.go index bc0d26d..2f8d19a 100644 --- a/pkg/internal/services/attachments.go +++ b/pkg/internal/services/attachments.go @@ -21,7 +21,7 @@ const metadataCacheLimit = 512 var metadataCache sync.Map func GetAttachmentByID(id uint) (models.Attachment, error) { - if val, ok := metadataCache.Load(id); ok { + if val, ok := metadataCache.Load(id); ok && val.(models.Attachment).AccountID > 0 { return val.(models.Attachment), nil }