Skip to content

Commit

Permalink
fix: tag null when load tags
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Apr 2, 2024
1 parent 94c81c2 commit af931a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/hole.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
}
}

Expand Down

0 comments on commit af931a4

Please sign in to comment.