Fix element always return Unknow

This commit is contained in:
M-307 2022-07-23 23:22:15 +07:00
parent 77b5cadfd7
commit ee6f8e0d63
2 changed files with 2 additions and 2 deletions

View File

@ -44,4 +44,4 @@ class CharacterAsset(BaseModel):
def __init__(__pydantic_self__, **data: Any) -> None:
super().__init__(**data)
__pydantic_self__.element = ElementType(__pydantic_self__.element).name if data["costElemType"] != "" else ElementType.Unknown.name
__pydantic_self__.element = ElementType(data["costElemType"]) if data["costElemType"] != "" else ElementType.Unknown.name

View File

@ -84,7 +84,7 @@ class CharacterInfo(BaseModel):
# Get element
__pydantic_self__.element = ElementType(character.element).name
# Load constellation
LOGGER.debug(f"=== Constellation ===")
for constellation in character.constellations: