From 343b5cb2e1edf37ed393cef9a3cc53994b808339 Mon Sep 17 00:00:00 2001 From: Arthur Pastel Date: Sun, 10 Dec 2023 02:51:54 +0100 Subject: [PATCH] fix: use regular Decimal during type substitution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Taken from #374 Co-authored-by: Sebastián Ramírez --- odmantic/model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/odmantic/model.py b/odmantic/model.py index 142d9228..abcf64df 100644 --- a/odmantic/model.py +++ b/odmantic/model.py @@ -39,7 +39,6 @@ _BSON_SUBSTITUTED_FIELDS, BaseBSONModel, ObjectId, - _decimalDecimal, _get_bson_serializer, ) from odmantic.config import ODMConfigDict, validate_config @@ -127,7 +126,7 @@ def find_duplicate_key(fields: Iterable[ODMBaseField]) -> Optional[str]: pydantic.BaseModel, bson.ObjectId, bson.Decimal128, - _decimalDecimal, + decimal.Decimal, )