From e152722b8c2b38b59c508809cb958898ff8da3f3 Mon Sep 17 00:00:00 2001 From: ko_oler <kooler89@gmail.com> Date: Sun, 17 Dec 2023 18:20:22 +0300 Subject: [PATCH] fix --- .../grpc/protobuf_type_converters.microgen.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go b/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go index 452d4019..70081af3 100644 --- a/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go +++ b/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go @@ -57,17 +57,18 @@ func PtrSpaceToProto(space *service.Space) (*pb.Space, error) { return nil, nil } cfg, _ := PtrConfigToProto(space.Config) - state, _ := PtrStateInfoToProto(space.StateInfo) - if state == nil { - state = &pb.StateInfo{} + var state pb.State + if space.StateInfo != nil { + state = pb.State(space.StateInfo.State) } + stateInfo, _ := PtrStateInfoToProto(space.StateInfo) return &pb.Space{ Id: space.ID, OrgId: space.OrgID, Name: space.Name, Description: space.Description, - State: pb.State(space.StateInfo.State), - StateInfo: state, + State: state, + StateInfo: stateInfo, Config: cfg, TransferToOrg: space.TransferToOrg, }, nil -- GitLab