From c7a5325ed6fb0ceb47a4575f4d9cd5763b22a7c6 Mon Sep 17 00:00:00 2001 From: NitinVangipuram Date: Fri, 6 Sep 2024 18:58:02 +0530 Subject: [PATCH 1/2] fixed download resume error --- CDC_Backend/APIs/adminViews.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CDC_Backend/APIs/adminViews.py b/CDC_Backend/APIs/adminViews.py index 0107b1a..d3133cd 100644 --- a/CDC_Backend/APIs/adminViews.py +++ b/CDC_Backend/APIs/adminViews.py @@ -467,8 +467,7 @@ def downloadResume(request, id, email, user_type): data = request.data if OPENING_TYPE in data: opening_type= data[OPENING_TYPE] - else: - opening_type= "Placement" + if opening_type == "Internship": opening = get_object_or_404(Internship, id=data[OPENING_ID]) applications = InternshipApplication.objects.filter(internship=opening) @@ -479,6 +478,7 @@ 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 = {} + print(applications); 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 From b97705355613dfba54f5e85b0ee1f4a12596136d Mon Sep 17 00:00:00 2001 From: NitinVangipuram Date: Fri, 6 Sep 2024 18:59:43 +0530 Subject: [PATCH 2/2] fixed download resume error --- CDC_Backend/APIs/adminViews.py | 1 - 1 file changed, 1 deletion(-) diff --git a/CDC_Backend/APIs/adminViews.py b/CDC_Backend/APIs/adminViews.py index d3133cd..626c5a8 100644 --- a/CDC_Backend/APIs/adminViews.py +++ b/CDC_Backend/APIs/adminViews.py @@ -478,7 +478,6 @@ 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 = {} - print(applications); 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