fix: InstitutionalReports — signal-aware category filter + Agri/Crypto/Bonds/Indices pills + Specialist Desks link
- Backend: category filter now ORs signal column so multi-category reports (category='multi') appear when filtering by Forex/Energy/Metals/Indices — fixes blank results - Frontend: category pills expanded to match desk taxonomy (agri, crypto, bonds, indices added; equities kept for compatibility) - Frontend: banner pointing to /specialist-desks clarifies the split between auto-fetched reports and manual desk report scheduling Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,19 @@ def list_reports(
|
||||
conditions.append("report_type = ?")
|
||||
params.append(report_type)
|
||||
if category:
|
||||
conditions.append("category = ?")
|
||||
# For categories that map to a signal column, also match reports
|
||||
# where that signal is non-neutral (most reports have category='multi')
|
||||
_signal_col = {
|
||||
'forex': 'signal_forex',
|
||||
'energy': 'signal_energy',
|
||||
'metals': 'signal_metals',
|
||||
'equities': 'signal_indices',
|
||||
'indices': 'signal_indices',
|
||||
}.get(category)
|
||||
if _signal_col:
|
||||
conditions.append(f"(category = ? OR {_signal_col} != 'neutral')")
|
||||
else:
|
||||
conditions.append("category = ?")
|
||||
params.append(category)
|
||||
if importance:
|
||||
conditions.append("importance >= ?")
|
||||
|
||||
Reference in New Issue
Block a user