Fix bug
This commit is contained in:
parent
6c170cccdd
commit
16f23b6e01
1 changed files with 7 additions and 4 deletions
|
@ -812,10 +812,13 @@ class UserContestSubmissionsAjax(UserContestSubmissions):
|
||||||
template_name = "submission/user-ajax.html"
|
template_name = "submission/user-ajax.html"
|
||||||
|
|
||||||
def contest_time(self, s):
|
def contest_time(self, s):
|
||||||
if s.contest.participation.live:
|
try:
|
||||||
if self.contest.time_limit:
|
if s.contest.participation.live:
|
||||||
return s.date - s.contest.participation.real_start
|
if self.contest.time_limit:
|
||||||
return s.date - self.contest.start_time
|
return s.date - s.contest.participation.real_start
|
||||||
|
return s.date - self.contest.start_time
|
||||||
|
except RelatedObjectDoesNotExist:
|
||||||
|
return None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue