diff --git a/backend/domain/simple_submission_checks/constraints/extension_not_present_constraint.py b/backend/domain/simple_submission_checks/constraints/extension_not_present_constraint.py index 864cb750..1a5ddcbb 100644 --- a/backend/domain/simple_submission_checks/constraints/extension_not_present_constraint.py +++ b/backend/domain/simple_submission_checks/constraints/extension_not_present_constraint.py @@ -11,22 +11,22 @@ class ExtensionNotPresentConstraint(BaseModel): type: ConstraintType = ConstraintType.EXTENSION_NOT_PRESENT - extension: str + not_present_extension: str def validate_constraint(self, path: Path) -> ExtensionNotPresentConstraintResult: directory = os.listdir(path) - files_with_extension = [file for file in directory if file.endswith(self.extension)] + files_with_extension = [file for file in directory if file.endswith(self.not_present_extension)] if files_with_extension: return ExtensionNotPresentConstraintResult( - extension=self.extension, + extension=self.not_present_extension, is_ok=False, files_with_extension=files_with_extension, ) return ExtensionNotPresentConstraintResult( - extension=self.extension, + extension=self.not_present_extension, is_ok=True, files_with_extension=files_with_extension, )