mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 18:19:08 +00:00
chore(fix): linkup citation mapping
This commit is contained in:
parent
cc4e02183b
commit
f956a39498
1 changed files with 13 additions and 2 deletions
|
@ -684,13 +684,24 @@ class ConnectorService:
|
|||
# Extract results from Linkup response - access as attribute instead of using .get()
|
||||
linkup_results = response.results if hasattr(response, 'results') else []
|
||||
|
||||
# Only proceed if we have results
|
||||
if not linkup_results:
|
||||
return {
|
||||
"id": 10,
|
||||
"name": "Linkup Search",
|
||||
"type": "LINKUP_API",
|
||||
"sources": [],
|
||||
}, []
|
||||
|
||||
# Process each result and create sources directly without deduplication
|
||||
sources_list = []
|
||||
documents = []
|
||||
|
||||
for i, result in enumerate(linkup_results):
|
||||
# Fix for UI
|
||||
linkup_results[i]['document']['id'] = self.source_id_counter
|
||||
# Only process results that have content
|
||||
if not hasattr(result, 'content') or not result.content:
|
||||
continue
|
||||
|
||||
# Create a source entry
|
||||
source = {
|
||||
"id": self.source_id_counter,
|
||||
|
|
Loading…
Add table
Reference in a new issue