Do not try to fetch price for items which contain no market group according to CCP data

This commit is contained in:
DarkPhoenix
2019-02-13 00:54:56 +03:00
parent b0317ea560
commit 591dcffa43
7 changed files with 50 additions and 32 deletions

View File

@@ -45,13 +45,19 @@ class Price(ViewColumn):
if stuff.isEmpty:
return ""
price = stuff.item.price
priceObj = stuff.item.priceObj
if not price or not price.isValid:
if not priceObj:
return ""
if not priceObj.isValid:
return False
# Fetch actual price as float to not modify its value on Price object
price = price.price
price = priceObj.price
if price == 0:
return ""
if isinstance(stuff, Drone) or isinstance(stuff, Cargo):
price *= stuff.amount