Fixed get_by_id type error in PSQL impl

This commit is contained in:
jofoks
2025-03-17 17:32:54 -07:00
parent 15b817c0d6
commit 54e4a31aa6
2 changed files with 2 additions and 4 deletions

View File

@@ -732,7 +732,7 @@ class PGDocStatusStorage(DocStatusStorage):
if result is None or result == []: if result is None or result == []:
return None return None
else: else:
return DocProcessingStatus( return dict(
content=result[0]["content"], content=result[0]["content"],
content_length=result[0]["content_length"], content_length=result[0]["content_length"],
content_summary=result[0]["content_summary"], content_summary=result[0]["content_summary"],
@@ -1058,7 +1058,6 @@ class PGGraphStorage(BaseGraphStorage):
Args: Args:
query (str): a cypher query to be executed query (str): a cypher query to be executed
params (dict): parameters for the query
Returns: Returns:
list[dict[str, Any]]: a list of dictionaries containing the result set list[dict[str, Any]]: a list of dictionaries containing the result set

View File

@@ -1473,8 +1473,7 @@ class LightRAG:
""" """
try: try:
# 1. Get the document status and related data # 1. Get the document status and related data
doc_status = await self.doc_status.get_by_id(doc_id) if not await self.doc_status.get_by_id(doc_id):
if not doc_status:
logger.warning(f"Document {doc_id} not found") logger.warning(f"Document {doc_id} not found")
return return