diff --git a/services/api/app.py b/services/api/app.py index 2feff26..d19fbc5 100644 --- a/services/api/app.py +++ b/services/api/app.py @@ -2717,7 +2717,8 @@ async def get_patterns_for_ticker( rows = await pool.fetch( """SELECT DISTINCT dir.catalyst_type FROM document_impact_records dir - JOIN documents d ON d.id = dir.document_id + JOIN document_intelligence di ON di.id = dir.intelligence_id + JOIN documents d ON d.id = di.document_id WHERE dir.ticker = $1 AND d.status != 'rejected' AND dir.catalyst_type IS NOT NULL""",