diff --git a/erepublik/__init__.py b/erepublik/__init__.py index de05039..e293da8 100644 --- a/erepublik/__init__.py +++ b/erepublik/__init__.py @@ -5,7 +5,7 @@ __author__ = """Eriks Karls""" __email__ = 'eriks@72.lv' __version__ = '0.20.0' -__commit_id__ = "09c6255" +__commit_id__ = "a208c8b" from erepublik import classes, utils from erepublik.citizen import Citizen diff --git a/erepublik/citizen.py b/erepublik/citizen.py index e36e280..13319e1 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -1083,7 +1083,7 @@ class CitizenEconomy(CitizenTravel): cheapest_q, cheapest = sorted(local_offers.items(), key=lambda v: v[1].price / utils.FOOD_ENERGY[v[0]])[0] - if cheapest["amount"] * utils.FOOD_ENERGY[cheapest_q] < hp_needed: + if cheapest.amount * utils.FOOD_ENERGY[cheapest_q] < hp_needed: amount = cheapest.amount else: amount = hp_needed // utils.FOOD_ENERGY[cheapest_q]