fixed add/edit application & markstatus issue in intenship

This commit is contained in:
NitinVangipuram 2024-10-24 20:10:02 +05:30
parent 8aa7246ec9
commit 95d7689a4c
1 changed files with 5 additions and 1 deletions

View File

@ -310,13 +310,17 @@ def submitApplication(request, id, email, user_type):
try:
data = request.data
if OPENING_TYPE in data:
opening_type= data[OPENING_TYPE]
if data[OPENING_TYPE] == "Internship":
opening_type= "Internship"
elif data[OPENING_TYPE] == "placements":
opening_type= "Placement"
else:
opening_type= "Placement"
if opening_type == "Internship":
opening = get_object_or_404(Internship, pk=data[OPENING_ID])
else:
opening = get_object_or_404(Placement, pk=data[OPENING_ID])
# print(opening);
student = get_object_or_404(Student, pk=data[STUDENT_ID])
# opening = get_object_or_404(Placement, pk=data[OPENING_ID])
student_user = get_object_or_404(User, id=student.id)