From 2c3399e237137a0f201960c56d3e2bb8d108a5ad Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Sat, 23 Mar 2024 22:41:21 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=95=8F=E6=84=9F=E8=AF=8D=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E7=9A=84=E5=8F=8C=E6=9D=A1=E4=BB=B6=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/config/migrations/m001_sensitive_word_migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/migrations/m001_sensitive_word_migration.py b/pkg/config/migrations/m001_sensitive_word_migration.py index cb8fc1c6..6e435eeb 100644 --- a/pkg/config/migrations/m001_sensitive_word_migration.py +++ b/pkg/config/migrations/m001_sensitive_word_migration.py @@ -14,7 +14,7 @@ class SensitiveWordMigration(migration.Migration): async def need_migrate(self) -> bool: """判断当前环境是否需要运行此迁移 """ - return os.path.exists("data/config/sensitive-words.json") + return os.path.exists("data/config/sensitive-words.json") and not os.path.exists("data/metadata/sensitive-words.json") async def run(self): """执行迁移