Skip to content

Commit 8bed848

Browse files
committed
Fix: Pass kwargs to subsequent queries in GitlabList
1 parent 1d82310 commit 8bed848

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gitlab/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,12 @@ def __init__(self, gl, url, query_data, get_next=True, **kwargs):
780780
self._query(url, query_data, **kwargs)
781781
self._get_next = get_next
782782

783+
# Preserve kwargs for subsequent queries
784+
if kwargs is None:
785+
self._kwargs = {}
786+
else:
787+
self._kwargs = kwargs.copy()
788+
783789
def _query(self, url, query_data=None, **kwargs):
784790
query_data = query_data or {}
785791
result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
@@ -864,7 +870,7 @@ def next(self):
864870
pass
865871

866872
if self._next_url and self._get_next is True:
867-
self._query(self._next_url)
873+
self._query(self._next_url, **self._kwargs)
868874
return self.next()
869875

870876
raise StopIteration

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy