Skip to content

Commit

Permalink
nit re #10862
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jun 25, 2024
1 parent 5f25a27 commit 9885c35
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions arches/app/utils/file_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ def test_unknown_filetypes(self, file, extension=None):
errors = []
match extension:
case "DS_Store":
if settings.FILE_TYPE_CHECKING:
if settings.FILE_TYPE_CHECKING == "lenient":
self.logger.log(
logging.WARN,
"DS_Store file encountered, proceeding with caution.",
)
else:
errors.append(f"File type is not permitted: {extension}")
if settings.FILE_TYPE_CHECKING == "lenient":
self.logger.log(
logging.WARN,
"DS_Store file encountered, proceeding with caution.",
)
else:
errors.append(f"File type is not permitted: {extension}")
case _ if extension not in settings.FILE_TYPES:
errors.append(f"File type is not permitted: {extension}")
case "xlsx":
Expand Down

0 comments on commit 9885c35

Please sign in to comment.