From 762275f9861025221b61ef40e57e2c197a2c0e7f Mon Sep 17 00:00:00 2001 From: Dmitry <52788865+LaciaMemeFrame@users.noreply.github.com> Date: Wed, 2 Mar 2022 23:55:55 +0300 Subject: [PATCH] Update mongo.py TypeError: to_list() missing 1 required positional argument: 'length' --- aiogram/contrib/fsm_storage/mongo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiogram/contrib/fsm_storage/mongo.py b/aiogram/contrib/fsm_storage/mongo.py index 7a128f1c91..6b7e61cda5 100644 --- a/aiogram/contrib/fsm_storage/mongo.py +++ b/aiogram/contrib/fsm_storage/mongo.py @@ -213,5 +213,5 @@ async def get_states_list(self) -> List[Tuple[int, int]]: :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]