Don't pass empty labels (looks weird to POST with a label set)

pull/6/head
Daniel Smith 2014-09-19 16:04:55 -07:00
parent e25171969b
commit 4aecdce258
1 changed files with 4 additions and 3 deletions

View File

@ -291,9 +291,10 @@ func executeAPIRequest(method string, c *client.Client) bool {
return false
}
r := c.Verb(verb).
Path(path).
ParseSelectorParam("labels", *selector)
r := c.Verb(verb).Path(path)
if len(*selector) > 0 {
r.ParseSelectorParam("labels", *selector)
}
if setBody {
if version != 0 {
data := readConfig(storage)