From 92e08097167b30928160f3ceb6b5497ec0a1199d Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Tue, 18 Aug 2015 11:08:20 +0800 Subject: [PATCH] Don't save associations if has any error happened --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index fe3fccc3..0003d575 100644 --- a/scope.go +++ b/scope.go @@ -459,5 +459,5 @@ func (scope *Scope) shouldSaveAssociations() bool { if ok && !saveAssociations.(bool) { return false } - return true + return true && !scope.HasError() }