diff --git a/chain_service/repositories/chain.py b/chain_service/repositories/chain.py index 6218337..98c15f0 100644 --- a/chain_service/repositories/chain.py +++ b/chain_service/repositories/chain.py @@ -19,8 +19,8 @@ class ChainRepository: return chain async def get_list(self) -> List[Chain]: - sort_order = [("last_modified", pymongo.DESCENDING)] - chains = [chain async for chain in self.collection.find().sort(sort_order)] + sort_order = ("lastModified", pymongo.DESCENDING) + chains = [chain async for chain in self.collection.find().sort(*sort_order)] return TypeAdapter(List[Chain]).validate_python(chains) async def get_by_id(self, chain_id: str) -> Chain | None: