mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-09 19:45:20 +00:00
Guard KB sync on document_id; fix comment style
This commit is contained in:
parent
64a170efce
commit
d28aed14b3
2 changed files with 2 additions and 2 deletions
|
|
@ -220,7 +220,7 @@ def create_update_notion_page_tool(
|
|||
f"update_page result: {result.get('status')} - {result.get('message', '')}"
|
||||
)
|
||||
|
||||
if result.get("status") == "success":
|
||||
if result.get("status") == "success" and document_id is not None:
|
||||
from app.services.notion import NotionKBSyncService
|
||||
|
||||
logger.info(f"Updating knowledge base for document {document_id}...")
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class NotionKBSyncService:
|
|||
f"Appended IDs (first 3): {appended_block_ids[:3]}, Fetched IDs count: {len(fetched_block_ids)}"
|
||||
)
|
||||
|
||||
if len(found_blocks) >= len(appended_block_ids) * 0.8: # 80% threshold
|
||||
if len(found_blocks) >= len(appended_block_ids) * 0.8: # 80% threshold
|
||||
logger.info(
|
||||
f"Content verified fresh: found {len(found_blocks)}/{len(appended_block_ids)} appended blocks"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue