Don't omitempty for option group default value

The value "" is meaningful, and the UI does not behave correctly if it's not present.
This commit is contained in:
Mike Lang
2017-05-16 17:49:12 -07:00
parent 383ace4d7e
commit 0e54b27e81

View File

@@ -343,7 +343,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.