From c6d1515e478dd113ef17dc1b4cb7c08ca73fd509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Fri, 16 Jan 2026 20:07:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soong_workflow/models/soong_workflow_mixin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 3ca81249c..4259bd5fd 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -130,8 +130,9 @@ class SoongWorkflowMixin(models.AbstractModel): else: self.is_active = False - if self.log_ids[-1].name == '归档' and self.log_ids[-1].is_active_operate == True: - self.is_active = False + if self.log_ids: + if self.log_ids[-1].name == '归档' and self.log_ids[-1].is_active_operate == True: + self.is_active = False def _compute_is_confirm(self): for record in self: