From 62de696b40f404b004b2aac4ea1ad1e7e776d020 Mon Sep 17 00:00:00 2001 From: Artucuno Date: Sun, 28 Jan 2024 19:04:09 +1100 Subject: [PATCH] Update abstract_repository.py --- pydantic_mongo/abstract_repository.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pydantic_mongo/abstract_repository.py b/pydantic_mongo/abstract_repository.py index 36b3a4d..2e37040 100644 --- a/pydantic_mongo/abstract_repository.py +++ b/pydantic_mongo/abstract_repository.py @@ -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: @@ -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: