From c17d7ce14f79c21037808894d8c7ba1117779130 Mon Sep 17 00:00:00 2001 From: Sergey Bondarev Date: Thu, 26 Sep 2019 20:32:29 +0300 Subject: [PATCH] fix(cli): fix cli command user-project list --- gitlab/v4/objects.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index c4679cda8..9f1918be5 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -278,8 +278,10 @@ def list(self, **kwargs): 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)