From 18f62a30c116403b747d626b30bd5400f8fe0727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Tue, 18 Nov 2025 14:31:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=AD=A6?= =?UTF-8?q?=E5=99=A8=E7=B1=BB=E5=9E=8B=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/api/routes/openapi.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/api/routes/openapi.py b/backend/api/routes/openapi.py index 275ddce7..b95d6d4a 100644 --- a/backend/api/routes/openapi.py +++ b/backend/api/routes/openapi.py @@ -124,7 +124,6 @@ async def get_skill_data_summary( json_files = [f for f in os.listdir(summary_dir) if f.endswith('.json')] res = [] for i in json_files: - print(i) if job in i: with open(os.path.join(summary_dir, i), encoding='utf-8') as f: skill_data = json.load(f) @@ -138,8 +137,8 @@ async def get_skill_data_summary( job_summary = get_redis_info(redis, key, get_skill_data_summary) for item in job_summary: if (len(weapons) == 0 or item['weapon'] in weapons): - skills = list(filter(lambda x: x['技能名称'] in skills, item['skills'])) if len(skills) > 0 else item['skills'] - for skill in skills: + items = list(filter(lambda x: x['技能名称'] in skills, item['skills'])) if len(skills) > 0 else item['skills'] + for skill in items: skill['武器类型'] = item['weapon'] data.extend(skills or []) except FileNotFoundError as e: