Fix issue in which prices are removed all the time (forgot to add the check for deleted to the condition >.<)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user