Skip to content

Commit

Permalink
Do not use evepraisal info unless there are orders up
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFenX committed Nov 3, 2019
1 parent 6b3e947 commit 9eb3b9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion service/marketSources/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__all__ = ['evemarketer', 'evemarketdata', 'evepraisal']
__all__ = ['evemarketer', 'evepraisal', 'evemarketdata']
4 changes: 4 additions & 0 deletions service/marketSources/evepraisal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ def fetchPrices(priceMap, fetchTimeout, system=None):
try:
typeID = int(itemData['typeID'])
price = itemData['prices']['sell']['min']
orderCount = itemData['prices']['sell']['order_count']
except (KeyError, TypeError):
continue
# evepraisal returns 0 if price data doesn't even exist for the item
if price == 0:
continue
# evepraisal seems to provide price for some items despite having no orders up
if orderCount < 1:
continue
priceMap[typeID].update(PriceStatus.fetchSuccess, price)
del priceMap[typeID]

Expand Down

0 comments on commit 9eb3b9e

Please sign in to comment.