Only set Id on document if it was given

This commit is contained in:
Marin Bek 2014-11-17 17:04:48 +01:00
父節點 4c9459a02b
當前提交 6c041327be

查看文件

@ -478,8 +478,11 @@ func (c *Connection) Update(d Document, query map[string]interface{}, extraArgs
ExtraArgs: extraArgs,
method: "POST",
api: "_update",
id: d.Id.(string),
}
if d.Id != nil {
r.id = d.Id.(string)
}
return r.Run()
}