From ec5dba96370f7b8669182d054682b037424ef3c4 Mon Sep 17 00:00:00 2001 From: seria Date: Fri, 22 Nov 2024 10:11:32 +0800 Subject: [PATCH] Fix KeyError in unnest_progress --- genshin/models/zzz/chronicle/notes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genshin/models/zzz/chronicle/notes.py b/genshin/models/zzz/chronicle/notes.py index 11d6039c..a3364e84 100644 --- a/genshin/models/zzz/chronicle/notes.py +++ b/genshin/models/zzz/chronicle/notes.py @@ -38,7 +38,7 @@ def full_datetime(self) -> datetime.datetime: @pydantic.model_validator(mode="before") def __unnest_progress(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: - return {**values, **values.pop("progress")} + return {**values, **values.pop("progress", {})} class ZZZEngagement(APIModel):