fix: source sade sati from domain service

This commit is contained in:
732642856
2026-07-16 14:59:36 +08:00
parent 8d7291d5cf
commit 09387d82ff
2 changed files with 34 additions and 0 deletions
+7
View File
@@ -4424,6 +4424,13 @@ class JyotishAPIHandler(BaseHTTPRequestHandler):
moon_lon=moon_lon,
current_date=datetime.utcnow(),
)
sade_sati = calculation_service.compute_sade_sati(
moon_degree=canonical_chart['planets']['Moon']['lon'],
asc_degree=canonical_chart['ascendant']['lon'],
reference_date=body.get('transit_date') or body.get('today') or body.get('current_date') or datetime.utcnow().strftime('%Y-%m-%d'),
tz=tz,
ayanamsa=body.get('ayanamsa', 'lahiri'),
)
canonical_planets = {}
for planet_name, planet in canonical_chart.get('planets', {}).items():
if not isinstance(planet, dict):