Skip to content

Commit d74ff50

Browse files
author
Gauvain Pocentek
committed
fix(api): Make *MemberManager.all() return a list of objects
Fixes #699
1 parent b21fa28 commit d74ff50

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

RELEASE_NOTES.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Release notes
44

55
This page describes important changes between python-gitlab releases.
66

7+
Changes from 1.8 to 1.9
8+
=======================
9+
10+
* ``ProjectMemberManager.all()`` and ``GroupMemberManager.all()`` now return a
11+
list of ``ProjectMember`` and ``GroupMember`` objects respectively, instead
12+
of a list of dicts.
13+
714
Changes from 1.7 to 1.8
815
=======================
916

gitlab/v4/objects.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ def all(self, **kwargs):
740740
"""
741741

742742
path = '%s/all' % self.path
743-
return self.gitlab.http_list(path, **kwargs)
743+
obj = self.gitlab.http_list(path, **kwargs)
744+
return [self._obj_cls(self, item) for item in obj]
744745

745746

746747
class GroupMergeRequest(RESTObject):
@@ -1955,7 +1956,8 @@ def all(self, **kwargs):
19551956
"""
19561957

19571958
path = '%s/all' % self.path
1958-
return self.gitlab.http_list(path, **kwargs)
1959+
obj = self.gitlab.http_list(path, **kwargs)
1960+
return [self._obj_cls(self, item) for item in obj]
19591961

19601962

19611963
class ProjectNote(RESTObject):

0 commit comments

Comments
 (0)