Skip to content

Commit

Permalink
sqlmodel: fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
adsharma committed Jan 10, 2025
1 parent f3c6713 commit 9dba242
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fquery/sqlmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ def decorator(cls):
if not is_dataclass(cls):
raise ValueError("The class must be a dataclass")

class Config:
exclude = {"__sqlmodel__", "sqlmodel"}

Config.ignored_types = (Config,)

# Generate the SQLModel class
sqlmodel_cls = type(
cls.__name__ + "SQLModel",
Expand All @@ -71,7 +66,7 @@ class Config:
},
# pydantic wants this
"__module__": cls.__module__,
"Config": Config,
"Config": {"exclude": {"__sqlmodel__", "sqlmodel"}},
**{
field.name: Field(
default_factory=getattr(cls, field.name, None),
Expand Down

0 comments on commit 9dba242

Please sign in to comment.