From ff3d1e2ed35722886156850757a835088b2cd037 Mon Sep 17 00:00:00 2001 From: XingQue Date: Sat, 25 Jul 2026 19:21:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A1=E6=A0=B8=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=8E=BB=E6=8E=89=E9=A1=BB=E7=9F=A5=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=BB=83=E7=AD=89=E6=95=8F=E6=84=9F=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自检误把「禁止代练」写进文案导致脚本自拦截;改为正向表述并不再触发敏感词。 Co-authored-by: Cursor --- .../management/commands/reset_lxs_shenhe_esports_coach.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jituan/management/commands/reset_lxs_shenhe_esports_coach.py b/jituan/management/commands/reset_lxs_shenhe_esports_coach.py index 584a47f..37345fc 100644 --- a/jituan/management/commands/reset_lxs_shenhe_esports_coach.py +++ b/jituan/management/commands/reset_lxs_shenhe_esports_coach.py @@ -90,7 +90,7 @@ BANNED_WORDS = ( ORDER_NOTICE = ( '本服务为龙先生电竞提供的线上电竞技巧支持、对局策略指导与正向技能交流。' - '全程由学员本人操作与决策;禁止任何代练、代打、上分行为;服务仅限线上指导,不提供面见式服务。' + '全程由学员本人登录并亲自操作、自行决策;服务内容仅限讲解、答疑与思路交流。' '请文明沟通,共建专业、健康的电竞学习环境。' ) @@ -181,10 +181,14 @@ class Command(BaseCommand): if len(zone_list) != 10: raise CommandError('内部错误:每个类型必须恰好 10 个商品模板') for title, intro, _price in zone_list: - blob = title + intro + ORDER_NOTICE + # 只扫标题/介绍;须知用正向表述,不出现敏感词本身 + blob = title + intro for w in BANNED_WORDS: if w in blob: raise CommandError(f'文案含禁止词「{w}」: {title}') + for w in BANNED_WORDS: + if w in ORDER_NOTICE: + raise CommandError(f'下单须知含禁止词「{w}」,请改成正向表述') for zones in ZONE_NAMES_BY_TYPE: if len(zones) != 2: