diff --git a/scripts/jyotish_api_server.py b/scripts/jyotish_api_server.py index 0328c8e3..45654003 100644 --- a/scripts/jyotish_api_server.py +++ b/scripts/jyotish_api_server.py @@ -6299,12 +6299,11 @@ class JyotishAPIHandler(BaseHTTPRequestHandler, VedastroEvidenceMixin, SynastryM normalized['houses'] = chart.get('houses') or modules.get('house_map') or {} normalized['dasha'] = modules.get('dasha') or chart.get('dasha') or {} yoga_module = modules.get('yoga') if isinstance(modules.get('yoga'), dict) else {} - normalized['yogas'] = ( - chart.get('yogas') - or yoga_module.get('yogas') - or yoga_module.get('detected_yogas') - or [] - ) + # Presence, not truthiness (upstream e9beae6b): an evaluated empty list + # must not resurrect an older chart preview; the full module comes first. + normalized['yogas'] = next((rows for rows in ( + yoga_module.get('yogas'), yoga_module.get('detected_yogas'), chart.get('yogas') + ) if isinstance(rows, list)), []) normalized['ashtakavarga'] = modules.get('ashtakavarga') or chart.get('ashtakavarga') or {} normalized['shadbala'] = modules.get('shadbala') or chart.get('shadbala') or {} normalized['birth'] = chart.get('birth_info') or full_reading.get('birth_info') or {} @@ -7133,7 +7132,7 @@ class JyotishAPIHandler(BaseHTTPRequestHandler, VedastroEvidenceMixin, SynastryM import logging logging.warning(f"[api_server] yoga expansion in _detect_yogas failed: {e}") - return yogas[:10] + return yogas def _compute_remedies(self, body): remedies_module = _load_local_module('remedies')