Fix totalCount for empty response, closes #905

This commit is contained in:
Wan Liuyang
2018-09-18 16:34:38 +08:00
parent 974d1ec593
commit 598bee8193
+1 -1
View File
@@ -155,7 +155,7 @@ class PaginatedList(PaginatedListBase):
headers=self.__headers
)
if 'link' not in headers:
self.__totalCount = len(data)
self.__totalCount = len(data) if data else 0
else:
links = self.__parseLinkHeader(headers)
lastUrl = links.get("last")