Skip to content

Commit

Permalink
šŸ› Use pure Decimal for _IMMUTABLE_TYPES without Annotated as it breakā€¦
Browse files Browse the repository at this point in the history
ā€¦s instance and class checks
  • Loading branch information
tiangolo committed Nov 21, 2023
1 parent 0e2d505 commit 0b4d6cd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions odmantic/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
from pydantic.main import BaseModel
from pydantic_core import InitErrorDetails

from odmantic.bson import (
_BSON_SUBSTITUTED_FIELDS,
BaseBSONModel,
ObjectId,
_decimalDecimal,
)
from odmantic.bson import _BSON_SUBSTITUTED_FIELDS, BaseBSONModel, ObjectId
from odmantic.config import ODMConfigDict, validate_config
from odmantic.exceptions import (
DocumentParsingError,
Expand Down Expand Up @@ -131,7 +126,7 @@ def find_duplicate_key(fields: Iterable[ODMBaseField]) -> Optional[str]:
pydantic.BaseModel,
bson.ObjectId,
bson.Decimal128,
_decimalDecimal,
decimal.Decimal,
)


Expand Down

0 comments on commit 0b4d6cd

Please sign in to comment.