mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 18:50:55 +00:00
Merge pull request #1384 from pjoe/update_err_fix
Fix dbBase.Update not returning error on failure
This commit is contained in:
commit
332fa44231
@ -488,7 +488,8 @@ func (d *dbBase) Update(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.
|
|||||||
|
|
||||||
d.ins.ReplaceMarks(&query)
|
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 res.RowsAffected()
|
||||||
}
|
}
|
||||||
return 0, err
|
return 0, err
|
||||||
|
Loading…
Reference in New Issue
Block a user