diff --git a/github/PaginatedList.py b/github/PaginatedList.py index 81e21220..04d5712c 100644 --- a/github/PaginatedList.py +++ b/github/PaginatedList.py @@ -175,7 +175,7 @@ class PaginatedList(PaginatedListBase): self.__nextParams = None if self.__list_item in data: - self.__totalCount = data['total_count'] + self.__totalCount = data.get('total_count') data = data[self.__list_item] content = [ @@ -211,7 +211,7 @@ class PaginatedList(PaginatedListBase): ) if self.__list_item in data: - self.__totalCount = data['total_count'] + self.__totalCount = data.get('total_count') data = data[self.__list_item] return [ diff --git a/github/PullRequest.py b/github/PullRequest.py index dd2a8b5d..3a63d660 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -538,7 +538,8 @@ class PullRequest(github.GithubObject.CompletableGithubObject): self._requester, self.url + "/requested_reviewers", None, - headers={'Accept': 'application/vnd.github.black-cat-preview+json'} + headers={'Accept': 'application/vnd.github.black-cat-preview+json'}, + list_item='users' ) def is_merged(self):