Skip to content

Commit 9e1a203

Browse files
authored
fix(instance): allow image to be empty in CreateServer (#189)
1 parent 6a61397 commit 9e1a203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/instance/v1/server_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type CreateServerRequest createServerRequest
2222
func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*CreateServerResponse, error) {
2323

2424
// If image is not a UUID we try to fetch it from marketplace.
25-
if !uuid.IsUUID(req.Image) {
25+
if req.Image != "" && !uuid.IsUUID(req.Image) {
2626
apiMarketplace := marketplace.NewAPI(s.client)
2727
imageId, err := apiMarketplace.GetLocalImageIDByLabel(&marketplace.GetLocalImageIDByLabelRequest{
2828
ImageLabel: req.Image,

0 commit comments

Comments
 (0)