From 805f7177df26aeb252a867705005c591b605ef60 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: Thu, 13 Aug 2026 11:05:50 +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, 4 insertions(+), 1 deletion(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 83dd0d4ff..356d9dad7 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -151,8 +151,11 @@ class SoongWorkflowMixin(models.AbstractModel): lambda l: l.name == '归档' and l.done_by == self.env.user and l.approval_state in ['0', '1']) if not archive_self_log: first_log = record.log_ids.sorted('sequence')[:1] - if first_log and first_log.done_by == self.env.user and self.state[0] == first_log.name: + if not self.state: has_first_user = True + else: + if first_log and first_log.done_by == self.env.user and self.state[0] == first_log.name: + has_first_user = True # :判断当前登录人是否在 log_ids2 中 has_log_ids2_user = False