Skip to content

Commit 979bf4c

Browse files
authored
Update collection.py
1 parent 50d5333 commit 979bf4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

filexdb/collection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def __find_one(self, query: Mapping = None) -> Document | None:
133133
return _result
134134
"""
135135

136-
def find(self, query = None, limit = None) -> List[Document | None]:
136+
def find(self, query = None, limit = None) -> List[Document]:
137137
"""
138138
Finds all ``Document`` of ``Collection``.
139139
@@ -145,10 +145,10 @@ def find(self, query = None, limit = None) -> List[Document | None]:
145145
:param query: Condition to search Document
146146
:return: List of Document
147147
"""
148-
if type(limit) == type((1,)):
148+
if limit is not None && type(limit) == type((1,)):
149149
raise TypeError('Limit should be a tuple')
150150

151-
if type(query) == type({}):
151+
if query is not None && type(query) == type({}):
152152
raise TypeError('Limit should be a JOSN Object')
153153

154154
# Default result

0 commit comments

Comments
 (0)