From 1e90abfcba21ffae760bed201812a33823901dd4 Mon Sep 17 00:00:00 2001 From: zxstty Date: Sun, 20 Apr 2025 22:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=9A=84debug?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9B=B4=E6=96=B0=E6=97=B6=E5=80=99=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/entities/record.py | 2 +- apps/manager/flow.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/entities/record.py b/apps/entities/record.py index 6322cb106..a0747ba22 100644 --- a/apps/entities/record.py +++ b/apps/entities/record.py @@ -86,7 +86,7 @@ class RecordData(BaseModel): flow: RecordFlow | None = None content: RecordContent metadata: RecordMetadata - comment: RecordComment + comment: RecordComment= Field(default=RecordComment()) created_at: float = Field(alias="createdAt") diff --git a/apps/manager/flow.py b/apps/manager/flow.py index 80a046dc3..d67a556af 100644 --- a/apps/manager/flow.py +++ b/apps/manager/flow.py @@ -418,8 +418,9 @@ class FlowManager: error_msg = f"[FlowManager] 流 {flow_id} 不存在;可能为新创建" logger.error(error_msg) else: - flow_config.debug = await FlowManager.is_flow_config_equal(old_flow_config, flow_config) - await flow_loader.save(app_id, flow_id, flow_config) + if flow_config.debug: + flow_config.debug = await FlowManager.is_flow_config_equal(old_flow_config, flow_config) + await flow_loader.save(app_id, flow_id, flow_config) except Exception: logger.exception("[FlowManager] 存储/更新流失败") return None -- Gitee