diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 09b7b81bb..03e55568d 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -837,8 +837,10 @@ def next(self): self._current += 1 return item except IndexError: - if self._next_url and self._get_next is True: - self._query(self._next_url) - return self.next() + pass - raise StopIteration + if self._next_url and self._get_next is True: + self._query(self._next_url) + return self.next() + + raise StopIteration