Skip to content

Commit

Permalink
Fix APCShadowFloorNode model when floor data is empty (thesadru#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao authored Jun 24, 2024
1 parent 39b6a70 commit c13d724
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions genshin/models/starrail/chronicle/challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,16 @@ def __unnest_groups(cls, values: Dict[str, Any]) -> Dict[str, Any]:
class APCShadowFloorNode(FloorNode):
"""Node for a apocalyptic shadow floor."""

challenge_time: Optional[PartialTime]
buff: Optional[ChallengeBuff]
score: int
boss_defeated: bool

@property
def has_data(self) -> bool:
"""Check if the node has data."""
return bool(self.avatars)


class APCShadowFloor(StarRailChallengeFloor):
"""Floor in an apocalyptic shadow challenge."""
Expand Down

0 comments on commit c13d724

Please sign in to comment.