diff options
-rw-r--r-- | gitlab/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index ee2b074..ea29524 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -780,6 +780,12 @@ class GitlabList(object): self._query(url, query_data, **kwargs) self._get_next = get_next + # Preserve kwargs for subsequent queries + if kwargs is None: + self._kwargs = {} + else: + self._kwargs = kwargs.copy() + def _query(self, url, query_data=None, **kwargs): query_data = query_data or {} result = self._gl.http_request("get", url, query_data=query_data, **kwargs) @@ -864,7 +870,7 @@ class GitlabList(object): pass if self._next_url and self._get_next is True: - self._query(self._next_url) + self._query(self._next_url, **self._kwargs) return self.next() raise StopIteration |