From eb5d8d18ba8e46fe82ed547d1b6f9c0b23877c8f Mon Sep 17 00:00:00 2001
From: Alena Petraki <a.petraki@perx.ru>
Date: Sun, 17 Dec 2023 14:30:58 +0000
Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s)

---
 pkg/spaces/service.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/spaces/service.go b/pkg/spaces/service.go
index 614ace0c..c75dab18 100644
--- a/pkg/spaces/service.go
+++ b/pkg/spaces/service.go
@@ -57,7 +57,7 @@ func IsSpaceAvailable(ctx context.Context, spcs Spaces, spaceId string) error {
 		return errors.Wrap(err, "space not available")
 	}
 
-	if spc.StateInfo.State != StateReady {
+	if spc.StateInfo != nil && spc.StateInfo.State != StateReady {
 		return errors.New("space not available")
 	}
 
-- 
GitLab