From 174e758d19cad49094aac236494c2b5d5aa5cb18 Mon Sep 17 00:00:00 2001 From: Pelle Johnsen Date: Mon, 28 Sep 2015 14:07:35 +0200 Subject: [PATCH] Fix dbBase.Update not returning error --- orm/db.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orm/db.go b/orm/db.go index 2f2c52da..b62c165b 100644 --- a/orm/db.go +++ b/orm/db.go @@ -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