Skip to content

Commit ec13075

Browse files
committed
fix(cli): fix cli command user-project list
1 parent ff10726 commit ec13075

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitlab/v4/objects.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,10 @@ def list(self, **kwargs):
278278
GitlabAuthenticationError: If authentication is not correct
279279
GitlabListError: If the server cannot perform the request
280280
"""
281-
282-
path = "/users/%s/projects" % self._parent.id
281+
if self._parent is not None:
282+
path = '/users/%s/projects' % self._parent.id
283+
else:
284+
path = '/users/%s/projects' % kwargs['user_id']
283285
return ListMixin.list(self, path=path, **kwargs)
284286

285287

0 commit comments

Comments
 (0)