Handle invalid implants and boosters. Uses a different method to ensure implant and booster slot is not duplicated. Still need to modify existing databases to remove Booster table constraint. Reverts a previous commit: "Gracefully handle invalid boosters in database (both itemIDs that don't exist as well as non-booster items). Implants need a little more work" (aaa5a6ae18)

This commit is contained in:
blitzmann
2015-07-02 00:48:32 -04:00
parent 51696c509f
commit 717080b58c
6 changed files with 79 additions and 89 deletions

View File

@@ -274,7 +274,6 @@ class Fit(object):
except ValueError:
return False
fit.implants.freeSlot(implant)
fit.implants.append(implant)
self.recalc(fit)
return True
@@ -300,7 +299,6 @@ class Fit(object):
except ValueError:
return False
fit.boosters.freeSlot(booster)
fit.boosters.append(booster)
self.recalc(fit)
return True