From 916ed330ddcda92e4397802faa38331a7f7af46a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Oct 2025 05:46:23 +0000 Subject: [PATCH] Fix AttributeError in ObjectSerializer by checking for __dict__ attribute Co-authored-by: alexta69 <7450369+alexta69@users.noreply.github.com> --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 20c399f..b13ac9a 100644 --- a/app/main.py +++ b/app/main.py @@ -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)