From 5771e6d55554c9522f00f83f6977ae7179749432 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 1 Mar 2022 11:26:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4ng=5Fsign=20=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/wpm/services.py | 3 ++- hb_server/apps/wpm/signals.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/wpm/services.py b/hb_server/apps/wpm/services.py index acf5cf0..f836273 100644 --- a/hb_server/apps/wpm/services.py +++ b/hb_server/apps/wpm/services.py @@ -76,8 +76,9 @@ class WpmService(object): if wt.step.process == test.step.process: wproduct.ng_sign = None ticket = wt.ticket - ticket_data = wt.ticket_data + ticket_data = ticket.ticket_data ticket_data['retest_result'] = 1 + ticket.ticket_data = ticket_data ticket.update_by = user ticket.save() # 创建处理日志 diff --git a/hb_server/apps/wpm/signals.py b/hb_server/apps/wpm/signals.py index 67ba2d2..874859a 100644 --- a/hb_server/apps/wpm/signals.py +++ b/hb_server/apps/wpm/signals.py @@ -71,7 +71,9 @@ def handleTicket(sender, instance, created, **kwargs): elif decision in [WProduct.NG_ACCEPT, WProduct.NG_PERMIT]: wp.act_state = WProduct.WPR_ACT_STATE_OK - if wp.test_wproduct.filter(is_submited=True).order_by('-id').last().type == TestRecord.TEST_PROCESS_RE: + # 获取最后一次检验 + test= wp.test_wproduct.filter(is_submited=True).order_by('-id').last() + if test.type == TestRecord.TEST_PROCESS_RE or test.is_midtesting: wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT wp.ng_sign = decision wt.save()