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
|
||||
|
||||
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)
|
||||
if self.code != self.__original_code:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue