Skip to content

Commit

Permalink
Support mongoose version numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
davidschrooten committed Nov 30, 2023
1 parent cc742d1 commit 3cc9a66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pydantic_mongo/abstract_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def to_document(model: T) -> dict:
data.pop("id")
if model.id:
data["_id"] = model.id
if model.v:
data["__v"] = model.v
return data

def __map_id(self, data: dict) -> dict:
Expand Down

0 comments on commit 3cc9a66

Please sign in to comment.