diff --git a/ciscoise_connector.py b/ciscoise_connector.py index d34f4a5..4f3323b 100644 --- a/ciscoise_connector.py +++ b/ciscoise_connector.py @@ -440,8 +440,10 @@ def _paginator(self, endpoint, action_result, limit=None): self.debug_print("Call to ERS API Failed") return None items_from_page = items.get("SearchResult", {}).get("resources") - items_list.extend(items_from_page) - self.debug_print("Retrieved {} records from the endpoint {}".format(len(items_from_page), endpoint)) + if items_from_page is not None: + items_list.extend(items_from_page) + self.debug_print("Retrieved {} records from the endpoint {}".format(len(items_from_page), endpoint)) + next_page_dict = items.get("SearchResult", {}).get("nextPage") if next_page_dict is not None: