Only set Id on document if it was given

This commit is contained in:
Marin Bek 2014-11-17 17:04:48 +01:00
parent 4c9459a02b
commit 6c041327be

View File

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