Skip to content

Commit 9e0a8b6

Browse files
authored
fixed limit type
1 parent 71e65c0 commit 9e0a8b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

filexdb/collection.py

Lines changed: 3 additions & 1 deletion
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: Mapping = None, limit: tuple = None) -> List[Document | None]:
136+
def find(self, query: Mapping = None, limit = None) -> List[Document | None]:
137137
"""
138138
Finds all ``Document`` of ``Collection``.
139139
@@ -145,6 +145,8 @@ def find(self, query: Mapping = None, limit: tuple = None) -> List[Document | No
145145
:param query: Condition to search Document
146146
:return: List of Document
147147
"""
148+
if type(limit) == type((1,)):
149+
raise TypeError('Limit should be a tuple')
148150
# Default result
149151
_result = []
150152

0 commit comments

Comments
 (0)