Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix return type from document update #1030

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update documents.py
fix type hint
  • Loading branch information
CAPITAINMARVEL authored Oct 2, 2024
commit 9f073b60c5473730d44258d74a76dbbc6780d395
6 changes: 3 additions & 3 deletions beanie/odm/documents.py
Original file line number Diff line number Diff line change
@@ -562,7 +562,7 @@ async def save(
:param session: Optional[ClientSession] - pymongo session.
:param link_rule: WriteRules - rules how to deal with links on writing
:param ignore_revision: bool - do force save.
:return: None
:return: DocType
"""
if link_rule == WriteRules.WRITE:
link_fields = self.get_link_fields()
@@ -642,7 +642,7 @@ async def save_changes(

:param ignore_revision: bool - ignore revision id, if revision is turned on
:param bulk_writer: "BulkWriter" - Beanie bulk writer
:return: None
:return: Optional[DocType]
"""
if not self.is_changed:
return None
@@ -707,7 +707,7 @@ async def update(
:param ignore_revision: bool - force update. Will update even if revision id is not the same, as stored
:param bulk_writer: "BulkWriter" - Beanie bulk writer
:param pymongo_kwargs: pymongo native parameters for update operation
:return: None
:return: DocType
"""
arguments = list(args)

Loading