From ae29e70f5b4428b1dfd51cc8bf8802b7b963d7ec Mon Sep 17 00:00:00 2001 From: Gowtham Sai <66207607+gowtham3105@users.noreply.github.com> Date: Sat, 8 Oct 2022 13:20:41 +0530 Subject: [PATCH] Checking PPO tier in Placement Rules --- CDC_Backend/APIs/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CDC_Backend/APIs/utils.py b/CDC_Backend/APIs/utils.py index 561d389..5fc8d11 100644 --- a/CDC_Backend/APIs/utils.py +++ b/CDC_Backend/APIs/utils.py @@ -184,6 +184,10 @@ def PlacementApplicationConditions(student, placement): if int(i.placement.tier) < int(placement.tier): return False, "Can't apply for this tier" + for i in PPO: + if int(i.placement.tier) < int(placement.tier): + return False, "Can't apply for this tier" + if student.degree != 'bTech' and not placement.rs_eligible: raise PermissionError("Can't apply for this placement")