Skip to content

Commit

Permalink
Fix error in validate_file_before_submission use case
Browse files Browse the repository at this point in the history
  • Loading branch information
akuny committed May 1, 2024
1 parent 94e9735 commit 8f76fe5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nad_ch/application/use_cases/data_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ def validate_file_before_submission(
"Invalid file format. Only ZIP files are accepted."
)

file_validator = FileValidator(file, file.name)
file_validator = FileValidator(file, file.filename)
print(file, file.name)
if not file_validator.validate_file():
raise InvalidDataSubmissionFileError(
"Invalid file format. Only Shapefiles and Geodatabase files are accepted."
"Invalid zipped file. Only Shapefiles and Geodatabase files are accepted."
)

if not file_validator.validate_schema(column_map):
Expand Down

0 comments on commit 8f76fe5

Please sign in to comment.