This commit is contained in:
osiris account 2023-03-12 15:37:02 -07:00
parent 643531f284
commit 36fd489383
2 changed files with 2 additions and 1 deletions

View file

@ -44,7 +44,7 @@ async def retrieve_top_balances(top_number: int, env_vars: dict) -> list:
"""Retrieve top balances from the database."""
collection = _get_db_collection(env_vars)
top_balances = collection.find().sort({"balance": {"$lt": top_number}}, pymongo.DESCENDING)
top_balances = collection.find().sort({"balance"}, pymongo.DESCENDING).limit(top_number)
result = []
counter = 0