From b5e5d7337b78fdc831ca2754cc63944568f6ab9e Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Tue, 16 May 2017 17:49:12 -0700 Subject: [PATCH] Don't omitempty for option group default value The value "" is meaningful, and right now the UI errors out if it's not present. --- app/api_topologies.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api_topologies.go b/app/api_topologies.go index fb3e30170..21dee103d 100644 --- a/app/api_topologies.go +++ b/app/api_topologies.go @@ -362,7 +362,7 @@ func (a byName) Less(i, j int) bool { return a[i].Name < a[j].Name } type APITopologyOptionGroup struct { ID string `json:"id"` // Default value for the UI to adopt. NOT used as the default if the value is omitted, allowing "" as a distinct value. - Default string `json:"defaultValue,omitempty"` + Default string `json:"defaultValue"` Options []APITopologyOption `json:"options,omitempty"` // SelectType describes how options can be picked. Currently defined values: // "one": Default if empty. Exactly one option may be picked from the list.