fix:修复职业报错的情况

This commit is contained in:
2026-06-08 14:48:34 +08:00
parent a7e5470e2d
commit 258f06770c
6 changed files with 57 additions and 30 deletions
+2 -1
View File
@@ -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))