From e37315e6e11fb396c6b94e123f193e050d0ded89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Mon, 27 Jun 2022 11:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=81=E4=B9=A6=E6=9F=A5=E7=9C=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_server/crm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_server/crm/views.py b/test_server/crm/views.py index 9e4b058..09173c2 100644 --- a/test_server/crm/views.py +++ b/test_server/crm/views.py @@ -687,7 +687,7 @@ def candidate(request): candidate.msg = get_msg_from_id(candidate.ID_number) candidate.exam_year = candidate.examtest_date.year candidate.exam_month = candidate.examtest_date.month - if candidate.workscope.name in ['放射工作人员(上岗)', '放射工作人员(在岗)']: + if candidate.workscope and candidate.workscope.name in ['放射工作人员(上岗)', '放射工作人员(在岗)']: candidate.date1 = candidate.train_start_date.strftime("%Y年%m月%d日") candidate.date2 = candidate.train_end_date.strftime("%Y年%m月%d日") candidate.date3 = candidate.issue_date.strftime("%Y年%m月%d日")