diff --git a/api/ovdashboard_api/core/calevent.py b/api/ovdashboard_api/core/calevent.py index f927099..337716c 100644 --- a/api/ovdashboard_api/core/calevent.py +++ b/api/ovdashboard_api/core/calevent.py @@ -9,11 +9,11 @@ from functools import total_ordering from logging import getLogger from typing import Annotated, Self -from pydantic import AfterValidator, BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StringConstraints from vobject.base import Component _logger = getLogger(__name__) -StrippedStr = Annotated[str, AfterValidator(lambda s: s.strip())] +type StrippedStr = Annotated[str, StringConstraints(strip_whitespace=True)] @total_ordering