From 3819d3d7ed1a700f63b57682c54d87cfd454e866 Mon Sep 17 00:00:00 2001 From: karthikmurakonda Date: Sun, 19 Nov 2023 16:14:42 +0530 Subject: [PATCH 1/2] can apply only to greater tiers --- CDC_Backend/APIs/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CDC_Backend/APIs/utils.py b/CDC_Backend/APIs/utils.py index 2db341c..78e261e 100644 --- a/CDC_Backend/APIs/utils.py +++ b/CDC_Backend/APIs/utils.py @@ -250,11 +250,11 @@ def PlacementApplicationConditions(student, placement): return True, "Conditions Satisfied" for i in selected_companies: - if int(i.placement.tier) < int(placement.tier): + if int(i.placement.tier) <= int(placement.tier): return False, "Can't apply for this tier" for i in PPO: - if int(i.tier) < int(placement.tier): + if int(i.tier) <= int(placement.tier): return False, "Can't apply for this tier" if student.degree != 'bTech' and not placement.rs_eligible: From c298e313e20a6265ae261ceec307429877b6407c Mon Sep 17 00:00:00 2001 From: karthikmurakonda Date: Sun, 19 Nov 2023 16:37:41 +0530 Subject: [PATCH 2/2] 2 offer for tier 1 --- CDC_Backend/APIs/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CDC_Backend/APIs/utils.py b/CDC_Backend/APIs/utils.py index 78e261e..3c626ba 100644 --- a/CDC_Backend/APIs/utils.py +++ b/CDC_Backend/APIs/utils.py @@ -250,11 +250,11 @@ def PlacementApplicationConditions(student, placement): return True, "Conditions Satisfied" for i in selected_companies: - if int(i.placement.tier) <= int(placement.tier): + if int(i.placement.tier) != 1 and int(i.placement.tier) <= int(placement.tier): return False, "Can't apply for this tier" for i in PPO: - if int(i.tier) <= int(placement.tier): + if int(i.tier) != 1 and int(i.tier) <= int(placement.tier): return False, "Can't apply for this tier" if student.degree != 'bTech' and not placement.rs_eligible: