Compare commits
1 Commits
8c67bc6d75
...
5dad03ea45
Author | SHA1 | Date |
---|---|---|
Vangipuram Nitin | 5dad03ea45 |
|
@ -121,22 +121,10 @@ def getDashboard(request, id, email, user_type):
|
|||
|
||||
placementApplications = PlacementApplication.objects.filter(student_id=id).order_by('-updated_at')
|
||||
placementApplications = PlacementApplicationSerializer(placementApplications, many=True).data
|
||||
if studentDetails.degree == 'BSMS': # for BSMS branch is not considered
|
||||
internships = Internship.objects.filter(
|
||||
allowed_batch__contains=[studentDetails.batch],
|
||||
deadline_datetime__gte=datetime.datetime.now(),
|
||||
offer_accepted=True,
|
||||
email_verified=True
|
||||
).order_by('deadline_datetime')
|
||||
else:
|
||||
internships = Internship.objects.filter(
|
||||
allowed_batch__contains=[studentDetails.batch],
|
||||
internships = Internship.objects.filter(allowed_batch__contains=[studentDetails.batch],
|
||||
allowed_branch__contains=[studentDetails.branch],
|
||||
deadline_datetime__gte=datetime.datetime.now(),
|
||||
offer_accepted=True,
|
||||
email_verified=True
|
||||
).order_by('deadline_datetime')
|
||||
|
||||
offer_accepted=True, email_verified=True).order_by('deadline_datetime')
|
||||
|
||||
filtered_internships = internship_eligibility_filters(studentDetails, internships)
|
||||
internshipsdata = InternshipSerializerForStudent(filtered_internships, many=True).data
|
||||
|
|
|
@ -286,9 +286,9 @@ def InternshipApplicationConditions(student, internship):
|
|||
return False, "You have already secured a Internship"
|
||||
if student.degree not in internship.eligiblestudents:
|
||||
raise PermissionError("Can't apply for this Internship")
|
||||
if student.degree != 'BSMS' and student.branch not in internship.allowed_branch: # for BSMS branch is not considered
|
||||
if student.branch not in internship.allowed_branch:
|
||||
raise PermissionError("Can't apply for this Internship")
|
||||
if student.degree == bTech and student.batch not in internship.allowed_batch:
|
||||
if student.degree == 'bTech' and student.batch not in internship.allowed_batch:
|
||||
raise PermissionError("Can't apply for this Internship")
|
||||
if student.can_apply_internship == False:
|
||||
raise PermissionError("Can't apply for this Internship")
|
||||
|
|
Loading…
Reference in New Issue