Skip to content

Commit 91b4a64

Browse files
authored
fix: use default zone in marketplace.GetLocalImageIDByLabel (#164)
1 parent 1d5b453 commit 91b4a64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/marketplace/v1/marketplace_utils.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ type GetLocalImageIDByLabelRequest struct {
5555
// it returns the latest version of this specific image.
5656
func (s *API) GetLocalImageIDByLabel(req *GetLocalImageIDByLabelRequest) (string, error) {
5757

58+
if req.Zone == "" {
59+
defaultZone, _ := s.client.GetDefaultZone()
60+
req.Zone = defaultZone
61+
}
62+
5863
listImageRequest := &ListImagesRequest{}
5964
listImageResponse, err := s.ListImages(listImageRequest, scw.WithAllPages())
6065
if err != nil {

0 commit comments

Comments
 (0)