🐛 Fix empty data in starrail challenge boss floor

This commit is contained in:
xtaodada 2024-06-24 20:59:56 +08:00
parent 6c2c41239e
commit 277a33321a
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -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."""