minor changes in placement model

This commit is contained in:
karthik murakonda 2022-05-24 11:21:37 +05:30
parent f04c867329
commit 74571cf802
4 changed files with 11 additions and 7 deletions

View File

@ -357,7 +357,7 @@ def getStudentApplication(request, id, email, user_type):
application_info = {
"id": serializer.data['id'],
"additional_info": serializer.data['additional_info'],
"resume": serializer.data['resume'],
"resume": serializer.data['resume_link'],
}
return Response({'action': "Get Student Application", 'application_found': "true", "application_info": application_info,
"student_details":student_details }, status=status.HTTP_200_OK)

View File

@ -9,9 +9,9 @@ logger = logging.getLogger('db')
@precheck([COMPANY_NAME, ADDRESS, COMPANY_TYPE, NATURE_OF_BUSINESS, WEBSITE, COMPANY_DETAILS, IS_COMPANY_DETAILS_PDF,
CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, CITY, STATE, COUNTRY, PINCODE, DESIGNATION, DESCRIPTION,
IS_DESCRIPTION_PDF,
COMPENSATION_CTC, COMPENSATION_GROSS, COMPENSATION_TAKE_HOME, COMPENSATION_BONUS, COMPENSATION_DETAILS,
COMPENSATION_CTC, COMPENSATION_GROSS, COMPENSATION_TAKE_HOME, COMPENSATION_BONUS,
IS_COMPENSATION_DETAILS_PDF,
ALLOWED_BRANCH, SELECTION_PROCEDURE_ROUNDS, SELECTION_PROCEDURE_DETAILS, IS_SELECTION_PROCEDURE_DETAILS_PDF,
ALLOWED_BRANCH, RS_ELIGIBLE, SELECTION_PROCEDURE_ROUNDS, SELECTION_PROCEDURE_DETAILS, IS_SELECTION_PROCEDURE_DETAILS_PDF,
TENTATIVE_DATE_OF_JOINING,
TENTATIVE_NO_OF_OFFERS, OTHER_REQUIREMENTS, RECAPTCHA_VALUE
])
@ -32,6 +32,11 @@ def addPlacement(request):
opening.website = data[WEBSITE]
opening.company_details = data[COMPANY_DETAILS]
opening.is_company_details_pdf = data[IS_COMPANY_DETAILS_PDF]
if data[RS_ELIGIBLE] == 'Yes':
opening.rs_eligible = True
else:
opening.rs_eligible = False
opening.job_locations = data[JOB_LOCATIONS]
if opening.is_company_details_pdf:
company_details_pdf = []
@ -129,7 +134,6 @@ def addPlacement(request):
else:
raise ValueError('Compensation Bonus must be an integer')
opening.compensation_details = data[COMPENSATION_DETAILS]
opening.is_compensation_details_pdf = data[IS_COMPENSATION_DETAILS_PDF]
if opening.is_compensation_details_pdf:

View File

@ -97,6 +97,7 @@ DESCRIPTION_PDF = 'description_pdf'
DESCRIPTION_PDF_NAMES = 'description_pdf_names'
IS_DESCRIPTION_PDF = 'is_description_pdf'
OPENING_TYPE = 'opening_type'
JOB_LOCATIONS = 'job_locations'
COMPENSATION_CTC = 'compensation_ctc'
COMPENSATION_GROSS = 'compensation_gross'
COMPENSATION_TAKE_HOME = 'compensation_take_home'
@ -107,6 +108,7 @@ COMPENSATION_DETAILS_PDF_NAMES = 'compensation_details_pdf_names'
IS_COMPENSATION_DETAILS_PDF = 'is_compensation_details_pdf'
ALLOWED_BATCH = 'allowed_batch'
ALLOWED_BRANCH = 'allowed_branch'
RS_ELIGIBLE = 'rs_eligible'
BOND_DETAILS = 'bond_details'
SELECTION_PROCEDURE_ROUNDS = 'selection_procedure_rounds'
SELECTION_PROCEDURE_DETAILS = 'selection_procedure_details'

View File

@ -76,8 +76,6 @@ class Placement(models.Model):
compensation_gross = models.IntegerField(blank=False, default=None, null=True)
compensation_take_home = models.IntegerField(blank=False, default=None, null=True)
compensation_bonus = models.IntegerField(blank=True, default=None, null=True)
compensation_details = models.CharField(blank=True, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default=None,
null=True)
compensation_details_pdf_names = ArrayField(
models.CharField(null=True, default=None, max_length=JNF_TEXT_MAX_CHARACTER_COUNT), size=5,
default=list, blank=True)
@ -107,6 +105,7 @@ class Placement(models.Model):
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
rs_eligible = models.BooleanField(blank=False, default=False)
other_requirements = models.CharField(blank=True, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default="")
job_locations = models.CharField(blank=True, max_length=JNF_TEXT_MAX_CHARACTER_COUNT, default="")
additional_info = ArrayField(models.CharField(blank=True, max_length=JNF_TEXTMEDIUM_MAX_CHARACTER_COUNT), size=15,
default=list, blank=True)
email_verified = models.BooleanField(blank=False, default=False)
@ -128,7 +127,6 @@ class Placement(models.Model):
self.city_type = self.city_type.strip()[:JNF_SMALLTEXT_MAX_CHARACTER_COUNT]
self.designation = self.designation.strip()[:JNF_TEXT_MAX_CHARACTER_COUNT]
self.description = self.description.strip()[:JNF_TEXTAREA_MAX_CHARACTER_COUNT]
self.compensation_details = self.compensation_details.strip()[:JNF_TEXTAREA_MAX_CHARACTER_COUNT]
self.selection_procedure_details = self.selection_procedure_details.strip()[:JNF_TEXTAREA_MAX_CHARACTER_COUNT]
self.bond_details = self.bond_details.strip()[:JNF_TEXTAREA_MAX_CHARACTER_COUNT]
self.other_requirements = self.other_requirements.strip()[:JNF_TEXTAREA_MAX_CHARACTER_COUNT]