Browse Source

Only set Id on document if it was given

tags/v1.0.0
Marin Bek 9 years ago
parent
commit
6c041327be
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      goes.go

+ 4
- 1
goes.go View File

@@ -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()
}

Loading…
Cancel
Save