Skip to content

Commit 016d90c

Browse files
w7089nejch
w7089
authored andcommitted
fix(cli): add _from_parent_attrs to user-project manager (#2558)
1 parent 45b8930 commit 016d90c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gitlab/v4/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646

4747
self.mgr_cls._path = self.mgr_cls._path.format(**self.parent_args)
4848
self.mgr = self.mgr_cls(gl)
49-
49+
self.mgr._from_parent_attrs = self.parent_args
5050
if self.mgr_cls._types:
5151
for attr_name, type_cls in self.mgr_cls._types.items():
5252
if attr_name in self.args.keys():

gitlab/v4/objects/users.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def list(self, **kwargs: Any) -> Union[RESTObjectList, List[RESTObject]]:
666666
if self._parent:
667667
path = f"/users/{self._parent.id}/projects"
668668
else:
669-
path = f"/users/{kwargs['user_id']}/projects"
669+
path = f"/users/{self._from_parent_attrs['user_id']}/projects"
670670
return ListMixin.list(self, path=path, **kwargs)
671671

672672

0 commit comments

Comments
 (0)