From 0e6dbb3e5d50e8ab180c802d10acec0c99bd08c7 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Thu, 7 Jul 2022 18:48:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ES=20=E5=AD=98?= =?UTF-8?q?=E5=82=A8=20config=20=E8=A2=AB=E4=BF=AE=E6=94=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models/storage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/terminal/models/storage.py b/apps/terminal/models/storage.py index 4ddab1bcc..555c44aea 100644 --- a/apps/terminal/models/storage.py +++ b/apps/terminal/models/storage.py @@ -85,7 +85,8 @@ class CommandStorage(CommonStorageModelMixin, CommonModelMixin): config = self.config if self.type_es and config.get('INDEX_BY_DATE'): engine_mod = import_module(TYPE_ENGINE_MAPPING[self.type]) - store = engine_mod.CommandStore(config) + # 这里使用一个全新的 config, 防止修改当前的 config + store = engine_mod.CommandStore(self.config) store._ensure_index_exists() index_prefix = config.get('INDEX') or 'jumpserver' date = local_now_date_display()