Skip to content

Commit

Permalink
fix: Fix JSON Schema for ObjectIdField (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
ensaremirerol authored Mar 6, 2024
1 parent 6a962a5 commit 7bb1c2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic_mongo/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __get_pydantic_core_schema__(
]
)
return core_schema.json_or_python_schema(
json_schema=object_id_schema,
json_schema=core_schema.str_schema(),
python_schema=core_schema.union_schema(
[core_schema.is_instance_schema(ObjectId), object_id_schema]
),
Expand Down

0 comments on commit 7bb1c2e

Please sign in to comment.