From 7ef7a94739d129fe123a6b85c61ac8c71a786825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=AFla=20Marabese?= Date: Mon, 25 May 2026 13:54:52 +0200 Subject: [PATCH] chore(instance): verify that price is available before setting it --- internal/namespaces/instance/v1/custom_server_type.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/namespaces/instance/v1/custom_server_type.go b/internal/namespaces/instance/v1/custom_server_type.go index 9b4f6d3beb..7024bf6e19 100644 --- a/internal/namespaces/instance/v1/custom_server_type.go +++ b/internal/namespaces/instance/v1/custom_server_type.go @@ -139,8 +139,11 @@ func serverTypeListBuilder(c *core.Command) *core.Command { for _, pcuServerType := range listServersTypesResponse.Products { name := pcuServerType.Properties.Instance.OfferID serverType := &customServerType{ - Name: name, - HourlyPrice: pcuServerType.Price.RetailPrice, + Name: name, + } + + if pcuServerType.Price != nil && pcuServerType.Price.RetailPrice != nil { + serverType.HourlyPrice = pcuServerType.Price.RetailPrice } if availability, exists := availabilitiesResponse.Servers[name]; exists {