summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig95@gmail.com>2019-09-27 19:14:25 +0200
committerGitHub <noreply@github.com>2019-09-27 19:14:25 +0200
commit88b183376de5b8c986eac24955ef129ca4d781cc (patch)
treef907bf8139e977022dca1b5f1992891b907c89a2
parentff10726d70a62d32ef39398a431def9656c93927 (diff)
parentc17d7ce14f79c21037808894d8c7ba1117779130 (diff)
downloadgitlab-88b183376de5b8c986eac24955ef129ca4d781cc.tar.gz
Merge pull request #886 from LuckySB/cli_user_project
fix cli command user-project list
-rw-r--r--gitlab/v4/objects.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index c4679cd..9f1918b 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -278,8 +278,10 @@ class UserProjectManager(ListMixin, CreateMixin, RESTManager):
GitlabAuthenticationError: If authentication is not correct
GitlabListError: If the server cannot perform the request
"""
-
- path = "/users/%s/projects" % self._parent.id
+ if self._parent:
+ path = "/users/%s/projects" % self._parent.id
+ else:
+ path = "/users/%s/projects" % kwargs["user_id"]
return ListMixin.list(self, path=path, **kwargs)