Skip to content

Commit c17d7ce

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitlab/v4/objects.py

+4-2
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:
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)