Don't fail an api update when a skill has been removed (#1473)

This commit is contained in:
blitzmann
2018-03-21 22:12:21 -04:00
parent d7e24dfa8f
commit bd90ec4bf0

View File

@@ -121,8 +121,12 @@ class Character(object):
def apiUpdateCharSheet(self, skills, secStatus=0):
for skillRow in skills:
skill = self.getSkill(int(skillRow["typeID"]))
skill.setLevel(int(skillRow["level"]), persist=True, ignoreRestrict=True)
try:
skill = self.getSkill(int(skillRow["typeID"]))
skill.setLevel(int(skillRow["level"]), persist=True, ignoreRestrict=True)
except:
# if setting a skill doesn't work, it's not the end of the world, just quietly pass
pass
self.secStatus = secStatus