证书查看bug

This commit is contained in:
曹前明 2022-06-27 11:16:54 +08:00
parent 9996aa7288
commit e37315e6e1
1 changed files with 1 additions and 1 deletions

View File

@ -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")