This commit is contained in:
John Guo 2021-03-02 23:27:50 +08:00
parent 204fea395c
commit 4c78ce6e3f

View File

@ -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.