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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user