Merge branch 'development' into feature/recent

This commit is contained in:
blitzmann
2017-04-26 18:51:46 -04:00
2 changed files with 3 additions and 5 deletions

View File

@@ -20,7 +20,6 @@
import re
from sqlalchemy.orm import reconstructor
from sqlalchemy import inspect
import eos.db
from eqBase import EqBase
@@ -444,9 +443,8 @@ class Item(EqBase):
@property
def price(self):
# This happens when the price record is deleted from the database. We dynamically refresh the price object
# attached to the fit if it's determined to have been deleted
if self.__price is not None and inspect(self.__price).deleted:
# todo: use `from sqlalchemy import inspect` instead (mac-deprecated doesn't have inspect(), was imp[lemented in 0.8)
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

View File

@@ -1381,7 +1381,7 @@ class ItemProperties(wx.Panel):
else:
attrName = name.title()
value = getattr(self.item, name)
except Exception as e:
except:
# TODO: Add logging to this.
# We couldn't get a property for some reason. Skip it for now.
continue