Fix AttributeError in ObjectSerializer by checking for __dict__ attribute

Co-authored-by: alexta69 <7450369+alexta69@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-10-01 05:46:23 +00:00
parent 136c722636
commit 916ed330dd
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ config = Config()
class ObjectSerializer(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, object):
if hasattr(obj, '__dict__'):
return obj.__dict__
else:
return json.JSONEncoder.default(self, obj)