fix: 参考率除0bug
This commit is contained in:
parent
2fe1c08abc
commit
51e656af87
|
@ -509,7 +509,7 @@ def exam_rate(request):
|
|||
# 参加考试员工数
|
||||
testuser_count = base.values('user').distinct().count()
|
||||
# 参考率
|
||||
rate1 = testuser_count/user_count
|
||||
rate1 = testuser_count/user_count if user_count else 0
|
||||
# 考试总数
|
||||
# test_count = base.count()
|
||||
# 满分人数
|
||||
|
|
Loading…
Reference in New Issue