fixed linting
This commit is contained in:
parent
30b5e539bd
commit
e25f6cdb43
|
|
@ -2,7 +2,6 @@ from loguru import logger
|
|||
|
||||
from uuid import UUID
|
||||
from typing import List
|
||||
from bson import ObjectId
|
||||
from pydantic import TypeAdapter
|
||||
|
||||
from chain_service.database.database import Database
|
||||
|
|
@ -23,9 +22,7 @@ class ChainRepository:
|
|||
async def get_list(self, namespace_id: str) -> List[Chain]:
|
||||
# sort_order = ("lastModified", pymongo.DESCENDING)
|
||||
query = {"namespaceId": namespace_id}
|
||||
chains = [
|
||||
chain async for chain in self.collection.find({"namespaceId": namespace_id})
|
||||
]
|
||||
chains = [chain async for chain in self.collection.find(query)]
|
||||
return TypeAdapter(List[Chain]).validate_python(chains)
|
||||
|
||||
async def get_by_id(self, chain_id: str) -> Chain | None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user