From 67a89de5f31b390f6eb385cfcb0dce9a536e6dcc Mon Sep 17 00:00:00 2001 From: imagine-hussain Date: Tue, 26 Sep 2023 01:35:53 +1000 Subject: [PATCH] fix extension --- backend/server/routers/ctf.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/server/routers/ctf.py b/backend/server/routers/ctf.py index c0f9bd4a9..ee9a1c052 100644 --- a/backend/server/routers/ctf.py +++ b/backend/server/routers/ctf.py @@ -73,20 +73,21 @@ def hard_requirements(data: PlannerData) -> bool: # including validity of the program return ( data.program == "3778" - # and "COMPA1" in data.specialisations - # and "MATHC2" in data.specialisations - # and len(data.plan) == 3 + and "COMPA1" in data.specialisations + and "MATHC2" in data.specialisations + and len(data.plan) == 3 ) def extended_courses(data: PlannerData) -> bool: - return len({ + extended_courses = { "COMP3821", "COMP3891", "COMP6841", "COMP6843" "COMP6845" - }.intersection(all_courses(data))) >= 4 + } + return len(extended_courses & all_courses(data)) >= 3 def summer_course(data: PlannerData) -> bool: