diff --git a/gitlab/v4/objects/runners.py b/gitlab/v4/objects/runners.py index 4f9d7ce57..a0e185782 100644 --- a/gitlab/v4/objects/runners.py +++ b/gitlab/v4/objects/runners.py @@ -98,7 +98,10 @@ def all(self, scope: Optional[str] = None, **kwargs: Any) -> List[Runner]: if scope is not None: query_data["scope"] = scope obj = self.gitlab.http_list(path, query_data, **kwargs) - return [self._obj_cls(self, item) for item in obj] + if isinstance(obj, list): + return [self._obj_cls(self, item, created_from_list=True) for item in obj] + else: + return base.RESTObjectList(self, self._obj_cls, obj) @cli.register_custom_action("RunnerManager", ("token",)) @exc.on_http_error(exc.GitlabVerifyError)