Return an empty MongoDB page for a zero result limit
This commit is contained in:
parent
d06e982b46
commit
63825de2f9
1 changed files with 10 additions and 0 deletions
|
|
@ -143,6 +143,8 @@ class MongoDbDriver(TracingDatabaseDriver):
|
|||
|
||||
with MongoClient[Any](self.mongo_connection_string) as client:
|
||||
count = client[self.mongo_database].traces.count_documents(**query)
|
||||
if take == 0:
|
||||
return [], count
|
||||
|
||||
if skip:
|
||||
query["skip"] = skip
|
||||
|
|
|
|||
Loading…
Reference in a new issue