Compare commits

..

No commits in common. "48b59248e658defa8b4ef1d8341b845a38275a5c" and "7f2e4d24dd4bd738d5735702a4bbc62275a50b35" have entirely different histories.

2 changed files with 6 additions and 5 deletions

View File

@ -40,7 +40,7 @@ def addPlacement(request):
# opening.rs_eligible = True
# else:
# opening.rs_eligible = False
print(data[ELIGIBLESTUDENTS])
if data[ELIGIBLESTUDENTS] is None:
raise ValueError('Eligible Students cannot be empty')
elif set(json.loads(data[ELIGIBLESTUDENTS])).issubset(ELIGIBLE):
@ -486,7 +486,7 @@ def addInternship(request):
internship.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
else:
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE))
print(internship.eligiblestudents)
if data[PWD_ELIGIBLE] == 'Yes':
internship.pwd_eligible = True
else:

View File

@ -35,8 +35,6 @@ class Student(models.Model):
can_apply_internship = models.BooleanField(default=True, verbose_name='Internship Registered') #added for internship
changed_by = models.ForeignKey(User, blank=True, on_delete=models.RESTRICT, default=None, null=True)
degree = models.CharField(choices=DEGREE_CHOICES, blank=False, max_length=10, default=DEGREE_CHOICES[0][0])
isPwd = models.BooleanField(default=False, verbose_name='Person with Disability')
isBacklog = models.BooleanField(default=False, verbose_name='Has Backlog')
history = HistoricalRecords(user_model=User)
def __str__(self):
@ -143,11 +141,12 @@ class Placement(models.Model):
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
expected_no_of_offers = models.IntegerField(blank=False , default=None , null=True) # newly added
number_of_employees = models.IntegerField(blank=False, default=None, null=True) # newly added field
rs_eligible = models.BooleanField(blank=True, default=False) # needs to be deleted
eligiblestudents = ArrayField(
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
size=10,
default=list
) #newly added field
)
pwd_eligible = models.BooleanField(blank=True, default=False) #newly added field
backlog_eligible = models.BooleanField(blank=True, default=False) #newly added field
psychometric_test = models.BooleanField(blank=True, default=False) #newly added field
@ -339,6 +338,8 @@ class Internship(models.Model):
size=TOTAL_BATCHES,
default=list
)
sophomore_eligible = models.BooleanField(blank=False, default=False)
rs_eligible = models.BooleanField(blank=False, default=False) # needs to be deleted
eligiblestudents = ArrayField(
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
size=10,