🐛 修复水主元素判断报错问题

This commit is contained in:
CMHopeSunshine 2023-12-02 23:29:34 +08:00
parent 503723e549
commit a57a5a4e5b

View File

@ -311,8 +311,8 @@ class Character(Model):
character.region = '未知' character.region = '未知'
character.rarity = 5 character.rarity = 5
traveler_skill = role_skill_map['Name'][list(data['skillLevelMap'].keys())[-1]] traveler_skill = role_skill_map['Name'][list(data['skillLevelMap'].keys())[-1]]
find_element = re.search(r'[风雷岩草火冰]', traveler_skill).group() find_element = re.search(r'[风雷岩草火冰]', traveler_skill).group()
character.element = find_element character.element = find_element if find_element != "" else ""
role_name = find_element + '' role_name = find_element + ''
else: else:
character.region = role_datas_map[name]['region'] character.region = role_datas_map[name]['region']