Inventory structure update

This commit is contained in:
Eriks Karls 2019-10-30 19:42:05 +02:00
parent ef27960ff1
commit 66f459c692

View File

@ -1845,7 +1845,7 @@ class Citizen(CitizenAPI):
def buy_and_activate_house(self, q: int) -> Dict[int, datetime]: def buy_and_activate_house(self, q: int) -> Dict[int, datetime]:
inventory = self.update_inventory() inventory = self.update_inventory()
ok_to_activate = False 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 = [] offers = []
countries = [self.details.citizenship, ] countries = [self.details.citizenship, ]
if self.details.current_country != self.details.citizenship: if self.details.current_country != self.details.citizenship: