Skip to content

Commit

Permalink
Merge pull request #11304 from howbazaar/2.7-charm-profile
Browse files Browse the repository at this point in the history
#11304

The 2.7.3 release changed where the instance mutator got its lxd profile from, but did not guard against a nil struct return which old charms will have.
  • Loading branch information
jujubot committed Mar 10, 2020
2 parents 52a7a9c + be8d130 commit 6d3cc3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apiserver/facades/agent/instancemutater/shim.go
Expand Up @@ -90,6 +90,9 @@ type charmShim struct {

func (s *charmShim) LXDProfile() lxdprofile.Profile {
profile := s.Charm.LXDProfile()
if profile == nil {
return lxdprofile.Profile{}
}
return lxdprofile.Profile{
Config: profile.Config,
Description: profile.Description,
Expand Down

0 comments on commit 6d3cc3c

Please sign in to comment.