Don't preload if has any error

This commit is contained in:
Jinzhu 2016-01-03 14:21:21 +08:00
parent 8a0c77e5fc
commit f53af2a236

View File

@ -31,7 +31,7 @@ func equalAsString(a interface{}, b interface{}) bool {
}
func Preload(scope *Scope) {
if scope.Search.preload == nil {
if scope.Search.preload == nil || scope.HasError() {
return
}