Only allow clone contest after 1 day

This commit is contained in:
cuom1999 2024-04-24 14:13:11 -05:00
parent e24c208e1d
commit 345684300f

View file

@ -480,7 +480,10 @@ def is_contest_clonable(request, contest):
return True return True
if contest.access_code and not contest.is_editable_by(request.user): if contest.access_code and not contest.is_editable_by(request.user):
return False return False
if contest.ended: if (
contest.end_time is not None
and contest.end_time + timedelta(days=1) < contest._now
):
return True return True
return False return False