Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sqlmodel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def __init__(self, default: Any = Undefined, **kwargs: Any) -> None:
raise RuntimeError(
"Passing sa_type is not supported when also passing a sa_column"
)
if not hasattr(PydanticFieldInfo, "validation_alias"):
kwargs.pop("validation_alias")
super().__init__(default=default, **kwargs)
self.primary_key = primary_key
self.nullable = nullable
Expand Down Expand Up @@ -269,6 +271,7 @@ def Field(
*,
default_factory: Optional[NoArgAnyCallable] = None,
alias: Optional[str] = None,
validation_alias: Optional[str] = None,
title: Optional[str] = None,
description: Optional[str] = None,
exclude: Union[
Expand Down Expand Up @@ -310,6 +313,7 @@ def Field(
default,
default_factory=default_factory,
alias=alias,
validation_alias=validation_alias,
title=title,
description=description,
exclude=exclude,
Expand Down