Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: handle doc.blob as list (backref returns InstrumentedList)

LearningCircuit9ed123f5839d
diff --git a/src/local_deep_research/research_library/services/library_service.py b/src/local_deep_research/research_library/services/library_service.py
index e5e4d02d5b..99afa65d51 100644
--- a/src/local_deep_research/research_library/services/library_service.py
+++ b/src/local_deep_research/research_library/services/library_service.py
@@ -695,8 +695,10 @@ class LibraryService:
tracker.file_path = None
# Delete blob first (required due to PK constraint on document_id)
- if doc.blob:
- session.delete(doc.blob)
+ # doc.blob is a list due to backref, get first item if exists
+ if doc.blob and len(doc.blob) > 0:
+ for blob in doc.blob:
+ session.delete(blob)
# Delete database entry
session.delete(doc)