Skip to content

Commit

Permalink
fixing .get call (closes #2082)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascamata committed Jul 31, 2016
1 parent a7523a1 commit 3fe8eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def update_inventory(self):
'inventory_delta', {}).get('inventory_items', {})
if inventory_items:
for item in inventory_items:
item_info = item.get('inventory_item_data', {}).get('item')
item_info = item.get('inventory_item_data', {}).get('item', {})
if {"item_id", "count"}.issubset(set(item_info.keys())):
self.inventory.append(item['inventory_item_data']['item'])

Expand Down

0 comments on commit 3fe8eb0

Please sign in to comment.