From 92bf5e731df9bfde7d2c97eff66bfb45ac61f4d8 Mon Sep 17 00:00:00 2001 From: hhyo Date: Sat, 24 Aug 2024 16:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/utils/workflow_audit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/utils/workflow_audit.py b/sql/utils/workflow_audit.py index 0dd9e6870f..2c3368c455 100644 --- a/sql/utils/workflow_audit.py +++ b/sql/utils/workflow_audit.py @@ -203,7 +203,7 @@ def is_auto_reject(self): auto_review_wrong = self.sys_config.get( "auto_review_wrong", "" ) # 1表示出现警告就驳回,2和空表示出现错误才驳回 - review_content = self.workflow.sqlworkflowcontent.review_content + review_content = self.workflow.sqlworkflowcontent.review_content or '[]' warning_count, error_count = 0, 0 for r in json.loads(review_content): err_level = ReviewResult(**r).errlevel @@ -218,6 +218,7 @@ def is_auto_reject(self): ] ): return True + return False def is_auto_review(self) -> bool: if self.is_auto_reject():