fix(aurora): fixed an unboundlocalerror in Change.from_dict()
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 25s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 39s

This commit is contained in:
Seaswimmer 2024-05-04 22:02:31 -04:00
parent dc44e8c6de
commit b03ce04245
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -131,7 +131,7 @@ class Change(AuroraBaseModel):
if "duration" in data and data["duration"] and not isinstance(data["duration"], timedelta):
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):
elif "duration" in data and isinstance(data["duration"], timedelta):
duration = data["duration"]
else:
duration = None