Skip to content

Commit

Permalink
Update mongo.py (#857)
Browse files Browse the repository at this point in the history
TypeError: to_list() missing 1 required positional argument: 'length'
  • Loading branch information
LaciaMemeFrame committed Aug 13, 2022
1 parent a852b95 commit 016a8d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiogram/contrib/fsm_storage/mongo.py
Expand Up @@ -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]

0 comments on commit 016a8d3

Please sign in to comment.