liu tao hai 1 mes
pai
achega
39d2831128
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,