File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed
Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -191,27 +191,22 @@ def load_requirements(
191191 year = max ([degree_requirements_input .year , 2022 ])
192192 if input_req not in degree_plans [str (year )]:
193193 # Check if the years before this one have it
194- y = year
195- while str ( y := y - 1 ) in degree_plans :
194+ y = year - 1
195+ while y >= 2022 :
196196 if input_req in degree_plans [str (y )]:
197197 year = y
198198 break
199- if (
200- year != degree_requirements_input .year
201- ): # The using_year has been replaced to a working year
202- break
203- # Check if the years after this one have it
204- y = year
205- while str (y := y + 1 ) in degree_plans :
206- if input_req in degree_plans [str (y )]:
207- year = y
208- break
209- if (
210- year != degree_requirements_input .year
211- ): # The using_year has been replaced to a working year
212- break
213- print ("Error: Could not find the degree" )
214- raise DegreeNotFoundException
199+ y = y - 1
200+ else :
201+ # Check if the years after this one have it
202+ y = year
203+ while str (y := y + 1 ) in degree_plans :
204+ if input_req in degree_plans [str (y )]:
205+ year = y
206+ break
207+ else :
208+ print ("Error: Could not find the degree" )
209+ raise DegreeNotFoundException
215210 requirements_data = degree_plans [str (year )][input_req ]["requirements" ][
216211 "major"
217212 ]
You can’t perform that action at this time.
0 commit comments