mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修复比赛统计时间的 bug
This commit is contained in:
parent
c06626cbc1
commit
d074296087
@ -75,10 +75,8 @@ class MessageQueue(object):
|
||||
except ContestSubmission.DoesNotExist:
|
||||
# 第一次提交
|
||||
is_ac = submission.result == result["accepted"]
|
||||
# 增加题目总提交数计数器
|
||||
contest_problem.total_submit_number += 1
|
||||
if is_ac:
|
||||
total_time = 0
|
||||
total_time = int((submission.create_time - contest.start_time).total_seconds() / 60)
|
||||
# 增加题目总的ac数计数器
|
||||
contest_problem.total_accepted_number += 1
|
||||
contest_problem.save()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user