From e971b7927e0bedb7761344e7dd37417befbbc37a Mon Sep 17 00:00:00 2001 From: blitzmann Date: Fri, 21 Apr 2017 00:40:45 -0400 Subject: [PATCH] Fix issue in which prices are removed all the time (forgot to add the check for deleted to the condition >.<) --- eos/gamedata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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: