From af931a412b7b21561b6054e51af63173335f2965 Mon Sep 17 00:00:00 2001 From: Ke Chen Date: Tue, 2 Apr 2024 15:22:16 +0800 Subject: [PATCH] fix: tag null when load tags --- models/hole.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/hole.go b/models/hole.go index 5e72c7e..4b4c77c 100644 --- a/models/hole.go +++ b/models/hole.go @@ -128,14 +128,14 @@ func loadTags(holes Holes) (err error) { // remove sensitive tags if !tag.Sensitive() { tagMap[tag.ID] = tag - } else { - delete(tagMap, tag.ID) } } for _, hole := range holes { for _, tagID := range mapping[hole.ID] { - hole.Tags = append(hole.Tags, tagMap[tagID]) + if tagMap[tagID] != nil { + hole.Tags = append(hole.Tags, tagMap[tagID]) + } } }