Change pdf description path when code changes
This commit is contained in:
parent
6b2bd7c550
commit
82a6f910e3
2 changed files with 3 additions and 1 deletions
|
@ -559,6 +559,9 @@ class Problem(models.Model):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
|
self.pdf_description.name = problem_directory_file_helper(
|
||||||
|
self.code, self.pdf_description.name
|
||||||
|
)
|
||||||
super(Problem, self).save(*args, **kwargs)
|
super(Problem, self).save(*args, **kwargs)
|
||||||
if self.code != self.__original_code:
|
if self.code != self.__original_code:
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -63,7 +63,6 @@ from judge.models import (
|
||||||
Submission,
|
Submission,
|
||||||
SubmissionSource,
|
SubmissionSource,
|
||||||
Organization,
|
Organization,
|
||||||
VolunteerProblemVote,
|
|
||||||
Profile,
|
Profile,
|
||||||
LanguageTemplate,
|
LanguageTemplate,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue