@@ -118,24 +118,21 @@ def getDates(termcode):
118118def getPositions (departmentOrg , departmentAcct ):
119119 """ Get all of the positions that are in the selected department """
120120 currentUser = require_login ()
121- print ("ikikik" , departmentAcct , "fefefe" , departmentOrg , "lili" )
122- positions = (
123- FormHistory
121+ positions = set (
122+ LaborStatusForm
124123 .select (FormHistory , LaborStatusForm , Department )
125- .join (LaborStatusForm , on = (FormHistory .formID == LaborStatusForm .laborStatusFormID ))
124+ .join (FormHistory , on = (FormHistory .formID == LaborStatusForm .laborStatusFormID ))
125+ .switch (LaborStatusForm )
126126 .join (Department , on = (LaborStatusForm .department == Department .departmentID ))
127127 .where (
128128 (Department .ACCOUNT == departmentAcct ) &
129129 (Department .ORG == departmentOrg )
130130 )
131131 )
132- positions = set (positions )
133132 positionDict = {}
134133 for position in positions :
135- print (position .formID .POSN_CODE , "positionsssssss" )
136- if position .formID .POSN_CODE != "S12345" or currentUser .isLaborAdmin :
137- positionDict [position .formID .POSN_CODE ] = {"position" : position .formID .POSN_TITLE , "WLS" :position .formID .WLS , "positionCode" :position .formID .POSN_CODE }
138- print (positionDict , "seeeeeee" )
134+ if position .POSN_CODE != "S12345" or currentUser .isLaborAdmin :
135+ positionDict [position .POSN_CODE ] = {"position" : position .POSN_TITLE , "WLS" :position .WLS , "positionCode" :position .POSN_CODE }
139136 return json .dumps (positionDict )
140137
141138@main_bp .route ("/laborstatusform/getstudents/<termCode>/<student>" , methods = ["POST" ])
@@ -170,7 +167,6 @@ def checkTotalHours(termCode, student, hours):
170167 ((FormHistory .status == "Approved" ) | (FormHistory .status == "Pending" ))
171168 )
172169 term = Term .get (Term .termCode == termCode )
173- print ("yeet" , positions )
174170 totalHours = 0
175171 for item in positions :
176172 formID = item .formID
@@ -201,7 +197,6 @@ def releaseAndRehire():
201197
202198 # Create new labor status form
203199 student = Student .get (Student .ID == studentDict ['stuBNumber' ])
204- print ("## app/controllers/mainroutes/releaseandrehire##" )
205200 supervisor = Supervisor .get (Supervisor .ID == studentDict ['stuSupervisorID' ])
206201 department , created = Department .get_or_create (DEPT_NAME = studentDict ['stuDepartment' ])
207202 term , created = Term .get_or_create (termCode = studentDict ['stuTermCode' ])
0 commit comments