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):