mirror of https://github.com/go-gorm/gorm.git
Don't preload if has any error
This commit is contained in:
parent
8a0c77e5fc
commit
f53af2a236
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue