Merge pull request #1446 from pyfa-org/issue/1445-master

Issue/1445 master
This commit is contained in:
Ryan Holmes
2018-03-01 00:30:24 -05:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -120,10 +120,10 @@ class Character(object):
return all0
def apiUpdateCharSheet(self, skills, secStatus=0):
del self.__skills[:]
self.__skillIdMap.clear()
for skillRow in skills:
self.addSkill(Skill(self, skillRow["typeID"], skillRow["level"]))
skill = self.getSkill(int(skillRow["typeID"]))
skill.setLevel(int(skillRow["level"]), persist=True, ignoreRestrict=True)
self.secStatus = secStatus
@property

View File

@@ -66,7 +66,7 @@ class CharacterImportThread(threading.Thread):
with open(path, mode='r') as charFile:
sheet = ParseXML(charFile)
char = sCharacter.new(sheet.name + " (imported)")
sCharacter.apiUpdateCharSheet(char.ID, sheet.skills)
sCharacter.apiUpdateCharSheet(char.ID, sheet.skills, 0)
except:
# if it's not api XML data, try this
# this is a horrible logic flow, but whatever