From 66f459c6927760f2d16a19470d6807d051512b3a Mon Sep 17 00:00:00 2001 From: Eriks Karls Date: Wed, 30 Oct 2019 19:42:05 +0200 Subject: [PATCH] Inventory structure update --- erepublik/citizen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erepublik/citizen.py b/erepublik/citizen.py index d45ced4..2b746dd 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -1845,7 +1845,7 @@ class Citizen(CitizenAPI): def buy_and_activate_house(self, q: int) -> Dict[int, datetime]: inventory = self.update_inventory() ok_to_activate = False - if not [h for h in inventory['items']['final'].get('house', []) if h['quality'] == q]: + if not inventory['items']['final'].get('house', {}).get(q, {}): offers = [] countries = [self.details.citizenship, ] if self.details.current_country != self.details.citizenship: