Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
PydanticObjectId
types being parsed as strings when using Pydan…
…tic's `model_validate_json` Unsure if this could be fixed in a more stylish fashion, but it was simply incorrectly setup before, at least now it works. **Please make as many changes as needed if this solution could be improved.** I believe this bugfix is quite important. If you parse an ID (let's call the variable `identifier`) from a JSON file in order to look it up on your Mongo database... you won't find it. ```python await cls.find_one(cls.id == identifier) ``` will return `None` even if the object exists, because `identifier` will be of type `str` instead of `ObjectId` when parsing from a JSON file with Pydantic's `model_validate_json`. Fixes BeanieODM#940.
- Loading branch information