Skip to content

Commit

Permalink
Fix check for leader.country is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
oatmealproblem committed Dec 19, 2024
1 parent 8124ab7 commit 90f2e33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stellarisdashboard/parsing/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ def _check_known_leaders(self, db_active_leaders: Dict[int, datamodel.Leader]):
country = self._countries_by_ingame_id.get(leader_dict.get("country"))
self._update_leader_attributes(country=country, leader=leader, leader_dict=leader_dict)
if not leader.is_active:
country_data = leader.country.get_most_recent_data() if country is not None else None
country_data = leader.country.get_most_recent_data() if leader.country is not None else None
self._session.add(
datamodel.HistoricalEvent(
event_type=datamodel.HistoricalEventType.leader_died,
Expand Down

0 comments on commit 90f2e33

Please sign in to comment.