Only set Id on document if it was given
This commit is contained in:
parent
4c9459a02b
commit
6c041327be
5
goes.go
5
goes.go
@ -478,8 +478,11 @@ 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()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user