Skip to content

Commit 2f42078

Browse files
committed
whoever designed this confuses me immensely
1 parent fc12aa2 commit 2f42078

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

conditional/blueprints/major_project_submission.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def upload_major_project_files(user_dict=None):
7272
# Temporarily save files to a place, to be uploaded on submit
7373

7474
for _, file in request.files.lists():
75-
safe_name = secure_filename(file[0].filename)
75+
file = file[0] # remove it from the list because this is not the best
76+
safe_name = secure_filename(file.filename)
7677
filename = f"/tmp/{user_dict['username']}/{safe_name}"
7778

7879
os.makedirs(os.path.dirname(filename), exist_ok=True)

0 commit comments

Comments
 (0)