From 8b075bbde5021fa24d21c2fc77ddfc8cd0a3c66c Mon Sep 17 00:00:00 2001 From: Rob Carleski Date: Fri, 21 Dec 2018 17:15:08 +0000 Subject: [PATCH] Modify list method of userprojectmanager --- gitlab/v4/objects.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index fd673b522..92610fe47 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -236,8 +236,11 @@ def list(self, **kwargs): GitlabAuthenticationError: If authentication is not correct GitlabListError: If the server cannot perform the request """ + if self._parent is not None: + path = '/users/%s/projects' % self._parent.id + else: + path = '/users/%s/projects' % kwargs['user_id'] - path = '/users/%s/projects' % self._parent.id return ListMixin.list(self, path=path, **kwargs)