From 345684300f885648b6abf520418f0183e8b5b0ab Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 24 Apr 2024 14:13:11 -0500 Subject: [PATCH] Only allow clone contest after 1 day --- judge/views/contests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/judge/views/contests.py b/judge/views/contests.py index 7211333..f902aef 100644 --- a/judge/views/contests.py +++ b/judge/views/contests.py @@ -480,7 +480,10 @@ def is_contest_clonable(request, contest): return True if contest.access_code and not contest.is_editable_by(request.user): return False - if contest.ended: + if ( + contest.end_time is not None + and contest.end_time + timedelta(days=1) < contest._now + ): return True return False