Skip to content

Commit 2982b4f

Browse files
j1n-o9rFyusel
authored andcommitted
chore(mariadb): fix single view rows
1 parent 8392c94 commit 2982b4f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

internal/cmd/mariadb/instance/describe/describe.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,12 @@ func outputResult(p *print.Printer, outputFormat string, instance *mariadb.Insta
102102
table.AddSeparator()
103103
table.AddRow("NAME", instance.Name)
104104
table.AddSeparator()
105-
table.AddRow("LAST OPERATION TYPE", instance.LastOperation.GetType())
106-
table.AddSeparator()
107-
table.AddRow("LAST OPERATION STATE", instance.LastOperation.GetState())
108-
table.AddSeparator()
109-
105+
if _, ok := instance.LastOperation.GetStateOk(); ok {
106+
table.AddRow("LAST OPERATION TYPE", instance.LastOperation.GetType())
107+
table.AddSeparator()
108+
table.AddRow("LAST OPERATION STATE", instance.LastOperation.GetState())
109+
table.AddSeparator()
110+
}
110111
table.AddRow("PLAN ID", instance.PlanId)
111112
// Only show ACL if it's present and not empty
112113
if instance.Parameters != nil {

0 commit comments

Comments
 (0)