diff --git a/eos/effectHandlerHelpers.py b/eos/effectHandlerHelpers.py index bfc12da5e..5e1997ce7 100644 --- a/eos/effectHandlerHelpers.py +++ b/eos/effectHandlerHelpers.py @@ -109,7 +109,8 @@ class HandledList(list): # We must flag it as modified, otherwise it not be removed from the database # @todo: flag_modified isn't in os x skel. need to rebuild to include #flag_modified(thing, "itemID") - thing.itemID = 0 + if thing.isInvalid: # see GH issue #324 + thing.itemID = 0 list.remove(self, thing) class HandledModuleList(HandledList): @@ -191,6 +192,7 @@ class HandledImplantBoosterList(HandledList): oldObj = next((m for m in self if m.slot == thing.slot), None) if oldObj: logging.info("Slot %d occupied with %s, replacing with %s", thing.slot, oldObj.item.name, thing.item.name) + oldObj.itemID = 0 # hack to remove from DB. See GH issue #324 self.remove(oldObj) HandledList.append(self, thing)