Skip to content

Commit

Permalink
Verify origin ID in retrieveLatestCharmInfo.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlanigan committed Oct 26, 2021
1 parent afb6855 commit b758d11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apiserver/facades/controller/charmrevisionupdater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ func (api *CharmRevisionUpdaterAPI) retrieveLatestCharmInfo() ([]latestCharmInfo
logger.Errorf("charm %s has no origin, skipping", curl)
continue
}
if origin.Revision == nil || origin.Channel == nil || origin.Platform == nil {
logger.Errorf("charm %s has missing revision (%p), channel (%p), or platform (%p), skipping",
if origin.ID == "" || origin.Revision == nil || origin.Channel == nil || origin.Platform == nil {
logger.Errorf("charm %s has missing id(%s), revision (%p), channel (%p), or platform (%p), skipping",
curl, origin.Revision, origin.Channel, origin.Platform)
continue
}
Expand Down

0 comments on commit b758d11

Please sign in to comment.