mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Avoid null ref error when no organic online search results found
This commit is contained in:
@@ -645,7 +645,7 @@ def deduplicate_organic_results(online_results: dict) -> dict:
|
||||
for query, results in online_results.items():
|
||||
# Filter organic results keeping only first occurrence of each link
|
||||
filtered_organic = []
|
||||
for result in results.get("organic", []):
|
||||
for result in results.get("organic") or []:
|
||||
link = result.get("link")
|
||||
if link and link not in seen_links:
|
||||
seen_links.add(link)
|
||||
|
||||
Reference in New Issue
Block a user