Skip to content

Commit

Permalink
fix: use external id or id if name does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Aug 30, 2024
1 parent 0cd7306 commit 41a7df8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ func extractConfigsAndChangesFromResults(ctx api.ScrapeContext, scrapeStartTime
var ci *models.ConfigItem
var err error

if result.Name == "" {
result.Name = lo.CoalesceOrEmpty(lo.FirstOrEmpty(result.Aliases), result.ID)
}

if result.ID != "" {
// A result that only contains changes (example a result created by Cloudtrail scraper)
// doesn't have any id.
Expand Down

0 comments on commit 41a7df8

Please sign in to comment.