Skip to content

Commit

Permalink
Update abstract_repository.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Artucuno committed Jan 28, 2024
1 parent 9167103 commit 62de696
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pydantic_mongo/abstract_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def __validate(self):
raise Exception("Document class should have id field")
if not self.__collection_name:
raise Exception("Meta should contain collection name")
if not isinstance(self.__database, Database):
raise Exception("Database should be a pymongo Database object")

@property
def document_count(self) -> int:
Expand Down Expand Up @@ -412,8 +410,6 @@ def __validate(self):
raise Exception("Document class should have id field")
if not self.__collection_name:
raise Exception("Meta should contain collection name")
if not isinstance(self.__database, AsyncIOMotorDatabase):
raise Exception("Database should be AsyncIOMotorDatabase")

@staticmethod
def to_document(model: T) -> dict:
Expand Down

0 comments on commit 62de696

Please sign in to comment.