Fix issue with old item in market service causing error due to being non-existent.

This commit is contained in:
blitzmann
2015-12-09 20:54:29 -05:00
parent ae55a2c1d2
commit 0dd98330aa
2 changed files with 6 additions and 3 deletions

View File

@@ -83,7 +83,8 @@ def getItem(lookfor, eager=None):
else:
# Item names are unique, so we can use first() instead of one()
item = gamedata_session.query(Item).options(*processEager(eager)).filter(Item.name == lookfor).first()
itemNameMap[lookfor] = item.ID
if item:
itemNameMap[lookfor] = item.ID
else:
raise TypeError("Need integer or string as argument")
return item