[scrobbles] Fix dataclass dict converstion error
This commit is contained in:
@ -13,7 +13,10 @@ User = get_user_model()
|
|||||||
|
|
||||||
class ScrobbleLogDataEncoder(json.JSONEncoder):
|
class ScrobbleLogDataEncoder(json.JSONEncoder):
|
||||||
def default(self, o):
|
def default(self, o):
|
||||||
|
try:
|
||||||
return o.__dict__
|
return o.__dict__
|
||||||
|
except AttributeError:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
class ScrobbleLogDataDecoder(json.JSONDecoder):
|
class ScrobbleLogDataDecoder(json.JSONDecoder):
|
||||||
|
|||||||
Reference in New Issue
Block a user