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()