diff options
-rw-r--r-- | gitlab/v4/objects.py | 6 |
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) |