Skip to content

Commit

Permalink
bug fix: file names were not being saved properly for the tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
devowit committed Aug 17, 2020
1 parent a8853b3 commit 33e7716
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"request": "launch",
"module": "pytest",
"args": [
"backend\\tests",
"backend/tests",
"-s",
"-v"
],
Expand Down
3 changes: 2 additions & 1 deletion backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def get_folder(cls, project):
@classmethod
def save_file(cls, project, in_file):
folder = cls.get_folder(project)
filename = secure_filename(in_file.filename)
shorter_name=Path(in_file.flename).name #otherwise secure_filename does weird things on linux
filename = secure_filename(shorter_name)
file_path = folder/filename
in_file.save(str(file_path))
return file_path
Expand Down

0 comments on commit 33e7716

Please # to comment.