From 923ca15b6f8a45678ea3b864ffeb07da6c7b4f0c Mon Sep 17 00:00:00 2001 From: Jay Taylor Date: Thu, 2 Jul 2015 12:06:06 -0700 Subject: [PATCH] Surface errors emitted by `RowsAffected'. --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index 8ff514a9..cd6b235d 100644 --- a/scope.go +++ b/scope.go @@ -300,7 +300,7 @@ func (scope *Scope) Exec() *Scope { if !scope.HasError() { if result, err := scope.SqlDB().Exec(scope.Sql, scope.SqlVars...); scope.Err(err) == nil { - if count, err := result.RowsAffected(); err == nil { + if count, err := result.RowsAffected(); scope.Err(err) == nil { scope.db.RowsAffected = count } }