fix(aurora): fixed a valueerror in the Change.from_dict()
method
This commit is contained in:
parent
166421b6ba
commit
5d53eec2f1
1 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue