mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 04:10:49 +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)
|
||||
|
||||
if res, err := q.Exec(query, setValues...); err == nil {
|
||||
res, err := q.Exec(query, setValues...)
|
||||
if err == nil {
|
||||
return res.RowsAffected()
|
||||
}
|
||||
return 0, err
|
||||
|
Loading…
Reference in New Issue
Block a user