Skip to content

Commit

Permalink
🐛 Fix load old genshin ImgTheater model
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Nov 10, 2024
1 parent c9d3ba1 commit 668babe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions simnet/models/genshin/chronicle/img_theater.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import datetime
import enum
import typing
from typing import Optional

from pydantic import Field

Expand Down Expand Up @@ -44,8 +43,8 @@ class TheaterBuff(APIModel):
name: str
icon: str
desc: str
is_enhanced: Optional[bool] = False
id: Optional[int] = None
is_enhanced: typing.Optional[bool] = False
id: typing.Optional[int] = None

@property
def desc_html(self) -> str:
Expand Down Expand Up @@ -130,7 +129,7 @@ class Act(APIModel):
round_id: int
finish_time: datetime.datetime
finish_date_time: PartialTime
enemies: typing.Sequence[TheaterEnemy]
enemies: typing.Optional[typing.Sequence[TheaterEnemy]] = None
splendour_buff: typing.Optional[TheaterSplendourBuff] = None


Expand Down Expand Up @@ -187,7 +186,7 @@ class ImgTheaterDetailData(APIModel):
rounds_data: typing.Sequence[Act]
detail_stat: TheaterStats
backup_avatars: typing.Sequence[ActCharacter]
fight_statisic: ImgTheaterFightStatic
fight_statisic: typing.Optional[ImgTheaterFightStatic] = None


class ImgTheaterData(APIModel):
Expand Down

0 comments on commit 668babe

Please sign in to comment.