From 884053d4d85386741b27e6e8a6c5b65fefc4bb37 Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 16:03:09 +0530 Subject: [PATCH] docs: fix Decimal field prose to reference Field() instead of condecimal() The 'Decimals in SQLModel' section introduced its example with 'using the condecimal() function', but the example (and current SQLModel) uses Field(max_digits=..., decimal_places=...). condecimal() is a Pydantic v1 constrained-type helper that SQLModel does not re-export, and using it as an annotation trips static type checkers. Reword the sentence to match the paragraph above it and the code sample, both of which already use Field(). Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- docs/advanced/decimal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced/decimal.md b/docs/advanced/decimal.md index 465fe8bea8..35656c3ce4 100644 --- a/docs/advanced/decimal.md +++ b/docs/advanced/decimal.md @@ -31,7 +31,7 @@ For the database, **SQLModel** will use [SQLAlchemy's `DECIMAL` type](https://do ## Decimals in SQLModel -Let's say that each hero in the database will have an amount of money. We could make that field a `Decimal` type using the `condecimal()` function: +Let's say that each hero in the database will have an amount of money. We could make that field a `Decimal` type and set the number of digits and decimal places in the `Field()` function: {* ./docs_src/advanced/decimal/tutorial001_py310.py ln[1:11] hl[11] *}