Skip to content

Commit 69b5984

Browse files
authored
Use paged get for get_branch_permission. (#935)
* Use paged get for get_branch_permission. * Merge changes from #872 int bitbucket function _get_paged.
1 parent 0680183 commit 69b5984

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

atlassian/bitbucket/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2328,7 +2328,7 @@ def get_branch_permission(self, project_key, permission_id, repository_slug=None
23282328
:return:
23292329
"""
23302330
url = self._url_branches_permissions(project_key, permission_id, repository_slug)
2331-
return self.get(url)
2331+
return self._get_paged(url)
23322332

23332333
def all_branches_permissions(self, project_key, permission_id, repository_slug=None):
23342334
"""

atlassian/bitbucket/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ def _get_paged(self, url, params=None, data=None, flags=None, trailing=None, abs
6767
url = response.get("next")
6868
if url is None:
6969
break
70-
# From now on we have absolute URLs including the trailing slash if needed
70+
# From now on we have absolute URLs with parameters
7171
absolute = True
72+
# Params are now provided by the url
73+
params = {}
74+
# Trailing should not be added as it is already part of the url
7275
trailing = False
7376
else:
7477
if response.get("nextPageStart") is None:

0 commit comments

Comments
 (0)