We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3f38689 + ca6da62 commit 26d73e2Copy full SHA for 26d73e2
gitlab/objects.py
@@ -31,8 +31,10 @@
31
32
class jsonEncoder(json.JSONEncoder):
33
def default(self, obj):
34
+ from gitlab import Gitlab
35
if isinstance(obj, GitlabObject):
- return obj.__dict__
36
+ return {k: v for k, v in obj.__dict__.iteritems()
37
+ if not isinstance(v, BaseManager)}
38
elif isinstance(obj, Gitlab):
39
return {'url': obj._url}
40
return json.JSONEncoder.default(self, obj)
@@ -474,7 +476,7 @@ def json(self):
474
476
Returns:
475
477
str: The json string.
478
"""
- return json.dumps(self.__dict__, cls=jsonEncoder)
479
+ return json.dumps(self, cls=jsonEncoder)
480
481
482
class UserKey(GitlabObject):
0 commit comments