| 66 | self.value = self.value # run the validator (to ensure we catch any changed min/max values might CCP release) |
| 67 | |
| 68 | def build(self): |
| 69 | # try...except here to catch orphaned mutators. Pretty rare, only happens so far if hacking the database |
| 70 | # But put it here to remove the eos item link if it happens, until a better solution can be developed |
| 71 | try: |
| 72 | # dynamic attribute links to the Mutaplasmids attribute definition for this mutated definition |
| 73 | self.dynamicAttribute = next(a for a in self.item.mutaplasmid.attributes if a.attributeID == self.attrID) |
| 74 | # base attribute links to the base ite's attribute for this mutated definition (contains original, base value) |
| 75 | self.baseAttribute = self.item.baseItem.attributes[self.dynamicAttribute.name] |
| 76 | except (KeyboardInterrupt, SystemExit): |
| 77 | raise |
| 78 | except: |
| 79 | self.item = None |
| 80 | |
| 81 | @validates("value") |
| 82 | def validator(self, key, val): |