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