Fix problem code bug

This commit is contained in:
cuom1999 2022-09-21 22:21:05 -05:00
parent fa8c683439
commit 8459d3c6e6

View file

@ -152,19 +152,19 @@ class ProblemData(models.Model):
if e.errno != errno.ENOENT: if e.errno != errno.ENOENT:
raise raise
if self.zipfile: if self.zipfile:
self.zipfile.name = _problem_directory_file(new, self.zipfile.name) self.zipfile.name = problem_directory_file_helper(new, self.zipfile.name)
if self.generator: if self.generator:
self.generator.name = _problem_directory_file(new, self.generator.name) self.generator.name = problem_directory_file_helper(new, self.generator.name)
if self.custom_checker: if self.custom_checker:
self.custom_checker.name = _problem_directory_file( self.custom_checker.name = problem_directory_file_helper(
new, self.custom_checker.name new, self.custom_checker.name
) )
if self.custom_checker: if self.custom_checker:
self.custom_checker.name = _problem_directory_file( self.custom_checker.name = problem_directory_file_helper(
new, self.custom_checker.name new, self.custom_checker.name
) )
if self.custom_validator: if self.custom_validator:
self.custom_validator.name = _problem_directory_file( self.custom_validator.name = problem_directory_file_helper(
new, self.custom_validator.name new, self.custom_validator.name
) )
self.save() self.save()