[scrobbles] Add basic sentiment analysis
All checks were successful
build / test (push) Successful in 2m4s
All checks were successful
build / test (push) Successful in 2m4s
This commit is contained in:
@ -882,8 +882,14 @@ class Scrobble(TimeStampedModel):
|
||||
logger.warning("Log data could not be loaded", e)
|
||||
return logdata_cls()
|
||||
|
||||
# Strip log-only keys (stored in JSONField but not part of LogData dataclass)
|
||||
logdata_kwargs = {
|
||||
k: v for k, v in log_dict.items()
|
||||
if k in logdata_cls.__dataclass_fields__
|
||||
}
|
||||
|
||||
try:
|
||||
return logdata_cls(**log_dict)
|
||||
return logdata_cls(**logdata_kwargs)
|
||||
except ParseError as e:
|
||||
logger.warning(
|
||||
"Could not parse log data",
|
||||
|
||||
Reference in New Issue
Block a user