mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-13 17:52:38 +02:00
chore: ran linting
This commit is contained in:
parent
2125c76841
commit
f730df7c9d
3 changed files with 5 additions and 7 deletions
|
|
@ -72,7 +72,7 @@ def upgrade() -> None:
|
|||
# 4. Backfill existing documents with connector_id based on document_type matching
|
||||
# This maps document types to their corresponding connector types
|
||||
# Only backfills for documents in search spaces that have exactly one connector of that type
|
||||
|
||||
|
||||
# Map of document_type -> connector_type for backfilling
|
||||
document_connector_mappings = [
|
||||
("NOTION_CONNECTOR", "NOTION_CONNECTOR"),
|
||||
|
|
@ -168,4 +168,3 @@ def downgrade() -> None:
|
|||
END$$;
|
||||
"""
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -337,7 +337,9 @@ async def composio_callback(
|
|||
logger.info(
|
||||
f"Updating existing Composio connector {existing_connector.id} with new connected_account_id {final_connected_account_id}"
|
||||
)
|
||||
existing_config = existing_connector.config.copy() if existing_connector.config else {}
|
||||
existing_config = (
|
||||
existing_connector.config.copy() if existing_connector.config else {}
|
||||
)
|
||||
existing_config.update(connector_config)
|
||||
existing_connector.config = existing_config
|
||||
|
||||
|
|
|
|||
|
|
@ -135,9 +135,7 @@ async def _delete_connector_async(
|
|||
break
|
||||
|
||||
# Delete this batch (chunks are deleted via CASCADE)
|
||||
await session.execute(
|
||||
delete(Document).where(Document.id.in_(doc_ids))
|
||||
)
|
||||
await session.execute(delete(Document).where(Document.id.in_(doc_ids)))
|
||||
await session.commit()
|
||||
|
||||
total_deleted += len(doc_ids)
|
||||
|
|
@ -269,4 +267,3 @@ async def delete_documents_by_connector_id(
|
|||
total_deleted += len(doc_ids)
|
||||
|
||||
return total_deleted
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue