mirror of
https://github.com/alexta69/metube.git
synced 2026-06-13 16:40:05 +00:00
Fix AttributeError in ObjectSerializer by checking for __dict__ attribute
Co-authored-by: alexta69 <7450369+alexta69@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user