1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 17:50:58 +00:00

Fix dbBase.Update not returning error

This commit is contained in:
Pelle Johnsen 2015-09-28 14:07:35 +02:00
parent 95ef4c7136
commit 174e758d19

View File

@ -488,7 +488,8 @@ func (d *dbBase) Update(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.
d.ins.ReplaceMarks(&query)
if res, err := q.Exec(query, setValues...); err == nil {
res, err := q.Exec(query, setValues...)
if err == nil {
return res.RowsAffected()
}
return 0, err