NoneType object has no method get

This commit is contained in:
Eriks K 2020-05-14 17:15:11 +03:00
parent ab3ce2b8c3
commit 588475d554
2 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@
__author__ = """Eriks Karls"""
__email__ = 'eriks@72.lv'
__version__ = '0.20.0'
__commit_id__ = "a208c8b"
__commit_id__ = "ab3ce2b"
from erepublik import classes, utils
from erepublik.citizen import Citizen

View File

@ -2409,6 +2409,8 @@ class Citizen(CitizenAnniversary, CitizenCompanies, CitizenEconomy, CitizenLeade
def _wam(self, holding_id: int) -> NoReturn:
response = self.work_as_manager_in_holding(holding_id)
if response is None:
return
if response.get("status"):
self._report_action("WORK_AS_MANAGER", f"Worked as manager", **response)
if self.config.auto_sell: