liu tao 1 місяць тому
батько
коміт
39d2831128
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      apps/api/staff/exam/views.py

+ 1 - 1
apps/api/staff/exam/views.py

@@ -97,7 +97,7 @@ class ExamLogViewSet(CustomModelViewSet):
             item = {
                 'id':exam_log.id,
                 'name':exam_log.exam.name,
-                'subject':exam_log.exam.subject.name,
+                'subject':exam_log.exam.subject and exam_log.exam.subject.name or '',
                 'exam_time':strftime(exam_log.exam.exam_time),
                 'exam_end_time':strftime(exam_log.exam.exam_end_time),
                 'duration':exam_log.exam.duration,