Work around for lack of flag_modified() support

This commit is contained in:
blitzmann
2015-07-08 10:54:26 -04:00
parent adc9fb6d00
commit c92911b79a
2 changed files with 5 additions and 3 deletions

View File

@@ -186,7 +186,7 @@ def getFit(lookfor, eager=None):
else:
raise TypeError("Need integer as argument")
if fit.isInvalid:
if fit and fit.isInvalid:
with sd_lock:
removeInvalid([fit])
return None

View File

@@ -17,7 +17,7 @@
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
from sqlalchemy.orm.attributes import flag_modified
#from sqlalchemy.orm.attributes import flag_modified
import eos.db
import eos.types
import logging
@@ -107,7 +107,9 @@ class HandledList(list):
def remove(self, thing):
# We must flag it as modified, otherwise it not be removed from the database
flag_modified(thing, "itemID")
# @todo: flag_modified isn't in os x skel. need to rebuild to include
#flag_modified(thing, "itemID")
thing.itemID = 0
list.remove(self, thing)
class HandledModuleList(HandledList):