diff --git a/bopytex/planner/generate_compile_join_planner.py b/bopytex/planner/generate_compile_join_planner.py index 28e30cb..8fd2ad2 100644 --- a/bopytex/planner/generate_compile_join_planner.py +++ b/bopytex/planner/generate_compile_join_planner.py @@ -23,11 +23,13 @@ def build_subject_list_from_qty(qty: int) -> list[dict]: def planner(options: dict) -> list[Task]: try: students_csv = options["students_csv"] + assert options["students_csv"] != "" - except KeyError: + except (KeyError, AssertionError): try: quantity_subjects = options["quantity_subjects"] - except KeyError: + assert options["quantity_subjects"] != 0 + except (KeyError, AssertionError): raise PlannerMissingOption("students_csv or quantity_subjects is required") else: options["subjects"] = build_subject_list_from_qty(qty=quantity_subjects)