diff --git a/rendercv/cli.py b/rendercv/cli.py index f922094..7e6ac89 100644 --- a/rendercv/cli.py +++ b/rendercv/cli.py @@ -110,11 +110,11 @@ def handle_validation_error(exception: pydantic.ValidationError): end_date_error_is_found = False errors = exception.errors() - # Check if there are nested errors and flatten them: - # This is needed because of validate_section_input function. We need to tell the - # users what is the entry type RenderCV is looking for, for the given section. + # Check if this is a section error. If it is, we need to + # This is needed because how dm.validate_section_input function raises an exception. + # This is done to tell the user which which EntryType RenderCV excepts to see. for error_object in errors.copy(): - if "ctx" in error_object: + if "Please check your entries" in error_object["msg"] and "ctx" in error_object: location = error_object["loc"] ctx_object = error_object["ctx"] if "error" in ctx_object: diff --git a/rendercv/data_models.py b/rendercv/data_models.py index bfeca32..530597e 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -1126,8 +1126,6 @@ def get_a_sample_data_model(name: str) -> RenderCVDataModel: position="Your Position", date="My Whole Life", location="USA", - url="https://yourcompany.com", # type: ignore - url_text="view company website", highlights=[ "Did something great.", "Did something else great.", @@ -1158,8 +1156,6 @@ def get_a_sample_data_model(name: str) -> RenderCVDataModel: name="Your Project", location="Istanbul, Turkey", date="2015-01", - url="https://yourproject.com", # type: ignore - url_text="view details", highlights=[ "Did something **great**.", "Did *something* else great.", @@ -1186,8 +1182,6 @@ def get_a_sample_data_model(name: str) -> RenderCVDataModel: position="Your Position", date="My Whole Life", location="USA", - url="https://yourcompany.com", # type: ignore - url_text="view company website", highlights=[ "Did something great.", "Did something else great.",