Merge pull request #202 from CDC-IITDH/nitin

changes to downloadresume
This commit is contained in:
Jaya Surya P 2024-09-05 16:06:15 +05:30 committed by GitHub
commit 5e53859f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -479,9 +479,9 @@ def downloadResume(request, id, email, user_type):
if not os.path.isdir(STORAGE_DESTINATION_RESUME_ZIP):
os.makedirs(STORAGE_DESTINATION_RESUME_ZIP, exist_ok=True)
resumes = {}
for apl in applications:
if apl.selected:
resumes[apl.student.roll_no] = STORAGE_DESTINATION_RESUMES + apl.student.id + '/' + apl.resume # Check if the folder name is student id or user id
for apl in applications:
resumes[apl.student.roll_no] = STORAGE_DESTINATION_RESUMES + apl.student.id + '/' + apl.resume # Check if the folder name is student id or user id
with zipfile.ZipFile(STORAGE_DESTINATION_RESUME_ZIP + zip_filename, 'w', zipfile.ZIP_DEFLATED) as zip_file:
for student_roll_no, resume_path in resumes.items():