Skip to content

Commit

Permalink
ups, missed dictionary TradeDB.itemByFDevID for new EDCD plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgol committed Jul 6, 2016
1 parent dfe167b commit 0929a43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tradedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ def _loadItems(self):
SELECT item_id, name, category_id, avg_price, fdev_id
FROM Item
"""
itemByID, itemByName = {}, {}
itemByID, itemByName, itemByFDevID = {}, {}, {}
for ID, name, categoryID, avgPrice, fdevID in self.cur.execute(stmt):
category = self.categoryByID[categoryID]
item = Item(
Expand All @@ -1902,10 +1902,14 @@ def _loadItems(self):
)
itemByID[ID] = item
itemByName[name] = item
if fdevID:
itemByFDevID[fdevID] = item

category.items.append(item)

self.itemByID = itemByID
self.itemByName = itemByName
self.itemByFDevID = itemByFDevID

self.tdenv.DEBUG1(
"Loaded {:n} Items",
Expand Down

0 comments on commit 0929a43

Please sign in to comment.