mirror of
https://github.com/astaxie/beego.git
synced 2024-11-29 19:01:29 +00:00
Fix dbBase.Update not returning error
This commit is contained in:
parent
95ef4c7136
commit
174e758d19
@ -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