mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 05:07:44 +08:00
fix issue #1187
This commit is contained in:
parent
204fea395c
commit
4c78ce6e3f
@ -272,6 +272,10 @@ func (r Result) ScanList(listPointer interface{}, bindToAttrName string, relatio
|
||||
return gerror.Newf(`invalid relation specified: "%v"`, relationKV)
|
||||
}
|
||||
} else {
|
||||
if i >= len(r) {
|
||||
// There's no relational data.
|
||||
continue
|
||||
}
|
||||
v := r[i]
|
||||
if v == nil {
|
||||
// There's no relational data.
|
||||
@ -300,6 +304,10 @@ func (r Result) ScanList(listPointer interface{}, bindToAttrName string, relatio
|
||||
return gerror.Newf(`invalid relation specified: "%v"`, relationKV)
|
||||
}
|
||||
} else {
|
||||
if i >= len(r) {
|
||||
// There's no relational data.
|
||||
continue
|
||||
}
|
||||
relationDataItem := r[i]
|
||||
if relationDataItem == nil {
|
||||
// There's no relational data.
|
||||
|
Loading…
Reference in New Issue
Block a user