diff --git a/eos/gamedata.py b/eos/gamedata.py index 8700229dc..e943c8b48 100644 --- a/eos/gamedata.py +++ b/eos/gamedata.py @@ -444,8 +444,11 @@ class Item(EqBase): def price(self): # todo: use `from sqlalchemy import inspect` instead (need to verify it works in old and new OS X builds) - if self.__price is not None and getattr(self.__price, '_sa_instance_state', None): - pyfalog.debug("Price data for {} was deleted, resetting object".format(self.ID)) + + + + if self.__price is not None and getattr(self.__price, '_sa_instance_state', None) and self.__price._sa_instance_state.deleted: + pyfalog.debug("Price data for {} was deleted (probably from a cache reset), resetting object".format(self.ID)) self.__price = None if self.__price is None: