[Fix] Issue #801: Error during Paging (#802)

## Description
Pagination fix for nill pointer

## Type of change

- [x] 🐛 Bugfix## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* closes #801

## Test Plan

- [x]  Unit test
This commit is contained in:
Danny 2022-09-08 22:27:47 -04:00 committed by GitHub
parent c02817ac86
commit ca6331b66e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -435,11 +435,13 @@ func iterateFindContainerID(
return func(entry any) bool { return func(entry any) bool {
if isCalendar { if isCalendar {
entry = CreateCalendarDisplayable(entry) entry = CreateCalendarDisplayable(entry)
}
// True when pagination needs more time to get additional responses or
// when entry is not able to be converted into a displayable
if entry == nil { if entry == nil {
return true return true
} }
}
folder, ok := entry.(displayable) folder, ok := entry.(displayable)
if !ok { if !ok {
@ -451,6 +453,7 @@ func iterateFindContainerID(
return true return true
} }
// Display name not set on folder // Display name not set on folder
if folder.GetDisplayName() == nil { if folder.GetDisplayName() == nil {
return true return true