fix(aurora): fixed a valueerror in the Change.from_dict() method
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 43s

This commit is contained in:
Seaswimmer 2024-06-04 15:32:59 -04:00
parent 166421b6ba
commit 5d53eec2f1
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -53,10 +53,14 @@ class Change(AuroraBaseModel):
else:
timestamp = data["timestamp"]
try:
data["user_id"] = int(data["user_id"])
except ValueError:
data["user_id"] = 0
data.update({
"timestamp": timestamp,
"end_timestamp": end_timestamp,
"duration": duration,
"user_id": int(data["user_id"])
"duration": duration
})
return cls(bot=bot, **data)