From 73b405dbb125ae69d9dd6ec21309f496934f60eb Mon Sep 17 00:00:00 2001 From: Steven Landers Date: Mon, 2 Oct 2023 15:41:37 -0400 Subject: [PATCH] handle explicit empty info case (normal) --- x/upgrade/types/plan.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/upgrade/types/plan.go b/x/upgrade/types/plan.go index 74031b1ca..6104e883c 100644 --- a/x/upgrade/types/plan.go +++ b/x/upgrade/types/plan.go @@ -57,6 +57,9 @@ type UpgradeDetails struct { // UpgradeDetails parses and returns a details struct from the Info field of a Plan // The upgrade.pb.go is generated from proto, so this is separated here func (p Plan) UpgradeDetails() (UpgradeDetails, error) { + if p.Info == "" { + return UpgradeDetails{}, nil + } var details UpgradeDetails if err := json.Unmarshal([]byte(p.Info), &details); err != nil { // invalid json, assume no upgrade details