From 7309181fed2909b37e6412d77d5758547f9c712a Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 17 Nov 2025 21:44:50 -0500 Subject: [PATCH] [scrobbles] Fix dataclass dict converstion error --- vrobbler/apps/scrobbles/dataclasses.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/dataclasses.py b/vrobbler/apps/scrobbles/dataclasses.py index 0a2b4b3..c8a86cc 100644 --- a/vrobbler/apps/scrobbles/dataclasses.py +++ b/vrobbler/apps/scrobbles/dataclasses.py @@ -13,7 +13,10 @@ User = get_user_model() class ScrobbleLogDataEncoder(json.JSONEncoder): def default(self, o): - return o.__dict__ + try: + return o.__dict__ + except AttributeError: + return {} class ScrobbleLogDataDecoder(json.JSONDecoder):