From 56b7d846fa2c0b9f49ebf87ab001e5cc2debf3c0 Mon Sep 17 00:00:00 2001 From: Angel-Dijoux Date: Tue, 23 Jan 2024 18:40:45 +0100 Subject: [PATCH] fix: handle basics errors. --- src/business_logic/formation/get_formation_details.py | 4 ++-- src/business_logic/formation/parcoursup/helper/html_parser.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/business_logic/formation/get_formation_details.py b/src/business_logic/formation/get_formation_details.py index 2851cfc..3a69054 100644 --- a/src/business_logic/formation/get_formation_details.py +++ b/src/business_logic/formation/get_formation_details.py @@ -34,7 +34,7 @@ class FormationDetail: type: str jobs: Optional[list[Job]] continuation_studies: Optional[ContinuationOfStudies] - updated_at: date + updated_at: Optional[date] def _filter_by_link(formations: list[dict[str, Any]], for_id: str) -> dict[str, Any]: @@ -96,5 +96,5 @@ def get_formation_by_id(for_id: str) -> FormationDetail: return _process_formation(for_id) except Exception as e: raise ProcessFormationException( - "Error during formation processing : " + e + "Error during formation processing : " + str(e) ) from e diff --git a/src/business_logic/formation/parcoursup/helper/html_parser.py b/src/business_logic/formation/parcoursup/helper/html_parser.py index 45d8343..837acd1 100644 --- a/src/business_logic/formation/parcoursup/helper/html_parser.py +++ b/src/business_logic/formation/parcoursup/helper/html_parser.py @@ -70,4 +70,4 @@ def parse_html(self) -> ParcourSupExpectations: title = self._extract_title() expectations = self._extract_expectations() - return ParcourSupExpectations(title, expectations) + return ParcourSupExpectations(title=title, expectations=expectations)