Skip to content

Commit dc3dcd1

Browse files
author
Gauvain Pocentek
committed
Properly fix _raw_list
1 parent b815f3a commit dc3dcd1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

gitlab/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,17 @@ def _raw_list(self, path_, cls, extra_attrs={}, **kwargs):
365365

366366
get_all_results = kwargs.get('all', False)
367367

368+
# Remove these keys to avoid breaking the listing (urls will get too
369+
# long otherwise)
370+
for key in ['all', 'next_url']:
371+
if key in params:
372+
del params[key]
373+
368374
r = self._raw_get(path_, **params)
369375
raise_error_from_response(r, GitlabListError)
370376

371-
# Remove parameters from kwargs before passing it to constructor
372-
for key in ['all', 'page', 'per_page', 'sudo', 'next_url']:
377+
# These attributes are not needed in the object
378+
for key in ['page', 'per_page', 'sudo']:
373379
if key in params:
374380
del params[key]
375381

0 commit comments

Comments
 (0)