diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index a862b8b6..fcad869c 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -735,7 +735,7 @@ class PGDocStatusStorage(DocStatusStorage): if result is None or result == []: return None else: - return DocProcessingStatus( + return dict( content=result[0]["content"], content_length=result[0]["content_length"], content_summary=result[0]["content_summary"], @@ -1065,7 +1065,6 @@ class PGGraphStorage(BaseGraphStorage): Args: query (str): a cypher query to be executed - params (dict): parameters for the query Returns: list[dict[str, Any]]: a list of dictionaries containing the result set diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 3e0ebfe4..485b3d97 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -1544,8 +1544,7 @@ class LightRAG: """ try: # 1. Get the document status and related data - doc_status = await self.doc_status.get_by_id(doc_id) - if not doc_status: + if not await self.doc_status.get_by_id(doc_id): logger.warning(f"Document {doc_id} not found") return