diff --git a/erepublik/__init__.py b/erepublik/__init__.py index 4ed0c2e..ec4dc83 100644 --- a/erepublik/__init__.py +++ b/erepublik/__init__.py @@ -5,7 +5,7 @@ __author__ = """Eriks Karls""" __email__ = 'eriks@72.lv' __version__ = '0.20.3.2' -__commit_id__ = "0061503" +__commit_id__ = "5b580f7" from erepublik import classes, utils from erepublik.citizen import Citizen diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 3fa452c..a4293d1 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -763,9 +763,10 @@ class CitizenTravel(BaseCitizen): if data.get('alreadyInRegion'): return True else: - r_json = self._travel(data.get('preselectCountryId'), region_id).json() + country = COUNTRIES[data.get('preselectCountryId')] + r_json = self._travel(country, region_id).json() if r_json.get('message', '') == 'success': - self._update_citizen_location(data.get('preselectCountryId'), region_id) + self._update_citizen_location(country, region_id) self._report_action("TRAVEL", "Traveled to region", response=r_json) return True return False