Skip to content

Commit

Permalink
CurrentUser.Key uses _getListOrObject-method
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmaenpaa committed Oct 10, 2014
1 parent ff2d84c commit afcf1c2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gitlab.py
Expand Up @@ -667,11 +667,7 @@ class CurrentUser(GitlabObject):
shortPrintAttr = 'username'

def Key(self, id=None, **kwargs):
if id is None:
return CurrentUserKey.list(self.gitlab, **kwargs)
else:
return CurrentUserKey(self.gitlab, id)

return self._getListOrObject(CurrentUserKey, id, **kwargs)

class GroupMember(GitlabObject):
_url = '/groups/%(group_id)s/members'
Expand Down

0 comments on commit afcf1c2

Please sign in to comment.