From f53af2a236c6ad3d67104868f5fddb5128132dfa Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sun, 3 Jan 2016 14:21:21 +0800 Subject: [PATCH] Don't preload if has any error --- preload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preload.go b/preload.go index 2c981a79..9eaf0ab0 100644 --- a/preload.go +++ b/preload.go @@ -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 }