chenjingyang commited on
Commit
ec338f9
·
1 Parent(s): 2a00236

Fix get_by_id DB query ressult is empty array

Browse files
Files changed (1) hide show
  1. lightrag/kg/postgres_impl.py +1 -1
lightrag/kg/postgres_impl.py CHANGED
@@ -447,7 +447,7 @@ class PGDocStatusStorage(DocStatusStorage):
447
  sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and id=$2"
448
  params = {"workspace": self.db.workspace, "id": id}
449
  result = await self.db.query(sql, params, True)
450
- if result is None:
451
  return None
452
  else:
453
  return DocProcessingStatus(
 
447
  sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and id=$2"
448
  params = {"workspace": self.db.workspace, "id": id}
449
  result = await self.db.query(sql, params, True)
450
+ if result is None or result == []:
451
  return None
452
  else:
453
  return DocProcessingStatus(