fix:修复职业报错的情况
This commit is contained in:
@@ -60,7 +60,8 @@ def skill_detail_for_level(skill_data: dict[str, Any], level: int | None) -> dic
|
||||
return result
|
||||
|
||||
attribute = {**level_info, **detail}
|
||||
attribute['detail'] = attribute.get('optionDesc', '')
|
||||
option_desc = attribute.get('optionDesc')
|
||||
attribute['detail'] = option_desc if isinstance(option_desc, str) else ''
|
||||
|
||||
for key, value in (attribute.get('optionValue') or {}).items():
|
||||
attribute['detail'] = attribute['detail'].replace(f'{{{key}}}', str(value))
|
||||
|
||||
Reference in New Issue
Block a user