summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Yates <tyates@indeed.com>2020-06-22 15:21:55 -0500
committerTyler Yates <tyates@indeed.com>2020-06-22 15:33:06 -0500
commit1d011ac72aeb18b5f31d10e42ffb49cf703c3e3a (patch)
tree4027370803c1d6cdc4ecd3137e0769f2a78a48e6
parent1d82310da1a15f7172a3f87c2cf062bc0c17944d (diff)
downloadgitlab-1d011ac72aeb18b5f31d10e42ffb49cf703c3e3a.tar.gz
fix: pass kwargs to subsequent queries in gitlab list
-rw-r--r--gitlab/__init__.py8
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