Update mongo.py (#857)

TypeError: to_list() missing 1 required positional argument: 'length'
This commit is contained in:
Dmitry 2022-08-13 23:47:02 +03:00 committed by GitHub
parent a852b95596
commit 016a8d3c6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,5 +213,5 @@ class MongoStorage(BaseStorage):
:return: list of tuples where first element is chat id and second is user id
"""
db = await self.get_db()
items = await db[STATE].find().to_list()
items = await db[STATE].find().to_list(length=None)
return [(int(item['chat']), int(item['user'])) for item in items]