Don't save associations if has any error happened

This commit is contained in:
Jinzhu 2015-08-18 11:08:20 +08:00
parent 81c00fdc8f
commit 92e0809716
1 changed files with 1 additions and 1 deletions

View File

@ -459,5 +459,5 @@ func (scope *Scope) shouldSaveAssociations() bool {
if ok && !saveAssociations.(bool) { if ok && !saveAssociations.(bool) {
return false return false
} }
return true return true && !scope.HasError()
} }