Skip to content

Commit

Permalink
fix(cli): add _from_parent_attrs to user-project manager (#2558)
Browse files Browse the repository at this point in the history
  • Loading branch information
w7089 authored and nejch committed Oct 12, 2023
1 parent 45b8930 commit 016d90c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gitlab/v4/cli.py
Expand Up @@ -46,7 +46,7 @@ def __init__(

self.mgr_cls._path = self.mgr_cls._path.format(**self.parent_args)
self.mgr = self.mgr_cls(gl)

self.mgr._from_parent_attrs = self.parent_args
if self.mgr_cls._types:
for attr_name, type_cls in self.mgr_cls._types.items():
if attr_name in self.args.keys():
Expand Down
2 changes: 1 addition & 1 deletion gitlab/v4/objects/users.py
Expand Up @@ -666,7 +666,7 @@ def list(self, **kwargs: Any) -> Union[RESTObjectList, List[RESTObject]]:
if self._parent:
path = f"/users/{self._parent.id}/projects"
else:
path = f"/users/{kwargs['user_id']}/projects"
path = f"/users/{self._from_parent_attrs['user_id']}/projects"
return ListMixin.list(self, path=path, **kwargs)


Expand Down

0 comments on commit 016d90c

Please sign in to comment.