[scrobbles] Fix dataclass dict converstion error
This commit is contained in:
@ -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):
|
||||
|
||||
Reference in New Issue
Block a user