fix: exam/view 证书编号

This commit is contained in:
zty 2024-06-13 11:30:47 +08:00
parent 75e28817a2
commit 180c9fd9a5
1 changed files with 1 additions and 1 deletions

View File

@ -646,7 +646,7 @@ class ExamRecordViewSet(ListModelMixin, DestroyModelMixin, RetrieveModelMixin, G
# 查询证明编号创建时间为最后一个 # 查询证明编号创建时间为最后一个
cer = Certificate.objects.latest('证书编号') cer = Certificate.objects.latest('证书编号')
if cer: if cer:
cer_number = int(cer.证书编号[4:]) + 1 cer_number = int(cer.证书编号[5:]) + 1
cer_number = 'CTCZL' + str(cer_number) cer_number = 'CTCZL' + str(cer_number)
data_dict = { data_dict = {
'姓名': request.user.name, '姓名': request.user.name,