mirror of https://github.com/eyhc1/rendercv.git
refactor
This commit is contained in:
parent
c68b6bbaa4
commit
10f9190e58
|
@ -237,11 +237,13 @@ def handle_validation_error(exception: pydantic.ValidationError):
|
||||||
if isinstance(input, (dict, list)):
|
if isinstance(input, (dict, list)):
|
||||||
input = ""
|
input = ""
|
||||||
|
|
||||||
new_errors.append({
|
new_errors.append(
|
||||||
"loc": str(location),
|
{
|
||||||
"msg": message,
|
"loc": str(location),
|
||||||
"input": str(input),
|
"msg": message,
|
||||||
})
|
"input": str(input),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Print the errors in a nice table:
|
# Print the errors in a nice table:
|
||||||
table = rich.table.Table(
|
table = rich.table.Table(
|
||||||
|
|
|
@ -955,7 +955,9 @@ class RenderCVDataModel(RenderCVBaseModel):
|
||||||
design: RenderCVDesign | pydantic.json_schema.SkipJsonSchema[Any] = pydantic.Field(
|
design: RenderCVDesign | pydantic.json_schema.SkipJsonSchema[Any] = pydantic.Field(
|
||||||
default=ClassicThemeOptions(theme="classic"),
|
default=ClassicThemeOptions(theme="classic"),
|
||||||
title="Design",
|
title="Design",
|
||||||
description="The design information of the CV.",
|
description=(
|
||||||
|
"The design information of the CV. The default is the classic theme."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@pydantic.field_validator("design", mode="before")
|
@pydantic.field_validator("design", mode="before")
|
||||||
|
|
Loading…
Reference in New Issue