Fix problem and contest clone

This commit is contained in:
cuom1999 2022-11-07 15:39:10 -06:00
parent ac2fd3dfe0
commit 4b0de87f1e
2 changed files with 13 additions and 10 deletions

View file

@ -1,3 +1,4 @@
from copy import deepcopy
import json
import math
from calendar import Calendar, SUNDAY
@ -417,13 +418,13 @@ class ContestClone(
permission_required = "judge.clone_contest"
def form_valid(self, form):
contest = self.object
tags = self.object.tags.all()
organizations = self.object.organizations.all()
private_contestants = self.object.private_contestants.all()
view_contest_scoreboard = self.object.view_contest_scoreboard.all()
contest_problems = self.object.contest_problems.all()
tags = contest.tags.all()
organizations = contest.organizations.all()
private_contestants = contest.private_contestants.all()
view_contest_scoreboard = contest.view_contest_scoreboard.all()
contest_problems = contest.contest_problems.all()
contest = deepcopy(self.object)
contest.pk = None
contest.is_visible = False