Skip to content

Commit

Permalink
[cli] Fix listing of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Mar 11, 2018
1 parent 88391bf commit cb8ca65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitlab/v4/cli.py
Expand Up @@ -249,6 +249,9 @@ def extend_parser(parser):


def get_dict(obj, fields):
if isinstance(obj, six.string_types):
return obj

if fields:
return {k: v for k, v in obj.attributes.items()
if k in fields}
Expand Down

0 comments on commit cb8ca65

Please sign in to comment.