Skip to content

Commit a94ee4d

Browse files
committed
fix default value for rounds
1 parent 676d3c2 commit a94ee4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coc/wars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _from_data(self, data: dict) -> None:
420420
self.state: str = data_get("state")
421421
self.season: str = data_get("season")
422422

423-
rounds = data_get("rounds")
423+
rounds = data_get("rounds", [])
424424
self.number_of_rounds: int = len(rounds)
425425
# the API returns a list and the rounds that haven't started contain war tags of #0 (not sure why)...
426426
# we want to get only the valid rounds

0 commit comments

Comments
 (0)