Skip to content

Commit

Permalink
🐛 Fix empty data in starrail challenge boss floor
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Jun 24, 2024
1 parent 6c2c412 commit 277a333
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simnet/models/starrail/chronicle/challenge_boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ class StarRailChallengeBossBuff(APIModel):
class StarRailChallengeBossFloorNode(APIModel):
"""Node for a floor."""

challenge_time: PartialTime
challenge_time: Optional[PartialTime] = None
avatars: List[RogueCharacter]
buff: Optional[StarRailChallengeBossBuff] = None
score: int
boss_defeated: bool

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


class StarRailChallengeBossFloor(APIModel):
"""Floor in a challenge."""
Expand Down

0 comments on commit 277a333

Please sign in to comment.