WIP: Refactor Aurora (3.0.0) #29
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ class Change(AuroraBaseModel):
|
|||
def from_dict(cls, bot: Red, data: dict) -> "Change":
|
||||
if isinstance(data, str):
|
||||
data = json.loads(data)
|
||||
if "duration" in data and data["duration"] and not isinstance(data["duration"], timedelta):
|
||||
if "duration" in data and data["duration"] and not isinstance(data["duration"], timedelta) and not data["duration"] == "NULL":
|
||||
hours, minutes, seconds = map(int, data["duration"].split(':'))
|
||||
duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)
|
||||
elif "duration" in data and isinstance(data["duration"], timedelta):
|
||||
|
|
Loading…
Reference in a new issue