From 64f4b5ce20cb93f09391398efa3286dd52324677 Mon Sep 17 00:00:00 2001 From: ashlen Date: Sun, 14 Apr 2024 15:27:45 +0200 Subject: [PATCH] Module may not be present in assist char data For en arknights user doFx#0121 the currentEquip field is not present. --- arkprts/models/data.py | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arkprts/models/data.py b/arkprts/models/data.py index 91cc956..59dba95 100644 --- a/arkprts/models/data.py +++ b/arkprts/models/data.py @@ -283,7 +283,7 @@ class AssistChar(base.BaseModel): """Index of the operator.""" skill_index: int = pydantic.Field(alias="skillIndex") """Index of the selected skill.""" - current_equip: typing.Optional[str] = pydantic.Field(alias="currentEquip") + current_equip: typing.Optional[str] = pydantic.Field(default=None, alias="currentEquip") """Currently equipped module.""" tmpl: typing.Mapping[str, base.DDict] = pydantic.Field(default_factory=base.DDict, repr=False) """Alternative operator class data. Only for Amiya.""" diff --git a/pyproject.toml b/pyproject.toml index 5e0da8b..8065d87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "arkprts" requires-python = ">=3.9" -version = "0.3.6" +version = "0.3.7" dynamic = [ "dependencies", "description", diff --git a/setup.py b/setup.py index f917c28..660d03f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="arkprts", - version="0.3.6", + version="0.3.7", description="Arknights python wrapper.", url="https://github.com/thesadru/arkprts", packages=find_packages(exclude=["tests", "tests.*"]),