Fix get_by_id DB query ressult is empty array

This commit is contained in:
chenjingyang
2025-02-04 17:09:34 +08:00
parent 0c8a2bface
commit 6e79bef321

View File

@@ -447,7 +447,7 @@ class PGDocStatusStorage(DocStatusStorage):
sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and id=$2"
params = {"workspace": self.db.workspace, "id": id}
result = await self.db.query(sql, params, True)
if result is None:
if result is None or result == []:
return None
else:
return DocProcessingStatus(