fix cmd为空时bug

pull/8634/head
feng626 2022-07-20 13:20:37 +08:00 committed by Jiangjie.Bai
parent cb8690dd63
commit 626b6da9c4
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ class CommandFilterRule(OrgModelMixin):
regex.append(cmd)
continue
if not cmd:
continue
# 如果是单个字符
if cmd[-1].isalpha():
regex.append(r'\b{0}\b'.format(cmd))