Skip to content

Commit 0dfc637

Browse files
committed
fix a bug where attacks_per_member is not initialized
1 parent cd69207 commit 0dfc637

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
@@ -103,7 +103,7 @@ def _from_data(self, data: dict) -> None:
103103
self.start_time = try_enum(Timestamp, data=data_get("startTime"))
104104
self.end_time = try_enum(Timestamp, data=data_get("endTime"))
105105
self.war_tag: str = data_get("tag")
106-
if data_get("attacksPerMember") is None and self.is_cwl:
106+
if data_get("attacksPerMember") is None or self.is_cwl:
107107
self.attacks_per_member: int = 1
108108
else:
109109
self.attacks_per_member: int = data_get("attacksPerMember")

0 commit comments

Comments
 (0)