Stelle bestehende Quellzuordnungen wieder her und halte Connectoren beim eigenen Konto.
Deploy Development / deploy (push) Successful in 28s
Test Suite / pytest-backend (push) Failing after 2m11s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 10s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-19 16:58:50 +02:00
1 parent d6b70d8f92
commit c3a07cee64
8 files changed
+250 -9

No files matched your search

+10 -2
View File
@@ -146,7 +146,15 @@ def attach_new_reference(conn, element_id: UUID) -> None:
def backfill_source_bindings(conn) -> None:
"""Idempotent. Bound and ambiguous rows stay. Unique unresolved stock is bound once."""
"""Idempotent. Unique stock is bound once. A stored id is never retargeted.
Startup calls this before the application has imported the connector
modules. Register them first, otherwise every existing reference stays
unresolved and the case or matter can no longer open its originals.
"""
from app.sources import _install_sources
_install_sources()
conn.execute(
"""
UPDATE external_references
@@ -160,7 +168,7 @@ def backfill_source_bindings(conn) -> None:
FROM external_references er
JOIN elements e ON e.id = er.element_id
WHERE er.source <> 'url'
AND er.resolution = 'unresolved'
AND er.resolution IN ('unresolved', 'ambiguous')
AND er.connector_id IS NULL
"""
).fetchall()