Fix prev commit

This commit is contained in:
cuom1999 2023-02-22 17:03:14 -06:00
parent 82a6f910e3
commit f911345984

View file

@ -559,9 +559,10 @@ 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
)
if self.pdf_description:
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: