Skip to content

Commit 0b8c58e

Browse files
committed
add null check for current page
1 parent 48e413f commit 0b8c58e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/msgraph_core/tasks/page_iterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def next(self) -> Optional[PageResult]:
137137
Returns:
138138
dict: The next page of items, or None if there are no more pages.
139139
"""
140-
if not self.current_page.odata_next_link:
140+
if self.current_page is not None and not self.current_page.odata_next_link:
141141
return None
142142
response = self.convert_to_page(await self.fetch_next_page())
143143
page: PageResult[Any] = PageResult()

0 commit comments

Comments
 (0)