Skip to content

Commit

Permalink
fix(region): zone from guesttemplate's preferzone maybe nil (#7387)
Browse files Browse the repository at this point in the history
  • Loading branch information
rainzm committed Jul 30, 2020
1 parent e5404d3 commit 0deb908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/compute/models/guest_template.go
Expand Up @@ -349,8 +349,8 @@ func (gt *SGuestTemplate) getMoreDetails(ctx context.Context, userCred mcclient.
zone := ZoneManager.FetchZoneById(input.PreferZone)
if zone != nil {
input.PreferZone = zone.GetName()
out.ZoneId = zone.GetId()
}
out.ZoneId = zone.GetId()
out.Zone = input.PreferZone
}
out.Brand = Hypervisor2Brand(gt.Hypervisor)
Expand Down

0 comments on commit 0deb908

Please sign in to comment.