Skip to content

Commit

Permalink
fix BulkWriter.__init__ bug when it has object_class param input (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagd0520 authored Feb 15, 2025
1 parent 2190cd9 commit a2f14d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beanie/odm/bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def __init__(
self.object_class = object_class
self.bypass_document_validation = bypass_document_validation
self.comment = comment
self._collection_name: str
self._collection_name: Optional[str] = (
object_class.get_collection_name() if object_class else None
)

async def __aenter__(self) -> "BulkWriter":
return self
Expand Down

0 comments on commit a2f14d5

Please sign in to comment.