diff --git a/app/routes/automation.py b/app/routes/automation.py index 8f2988e..a16242a 100644 --- a/app/routes/automation.py +++ b/app/routes/automation.py @@ -409,7 +409,7 @@ async def run_automation( codigos_vistos = {str(r.get("CODIGO")) for r in rows_pac} rows_pac_todos = list(rows_pac) + [r for r in rows_pac_eps if str(r.get("CODIGO")) not in codigos_vistos] - if not rows_pac and not rows_rda: + if not rows_pac_todos and not rows_rda and not rows_ps: return JSONResponse({"success": False, "message": f"No hay datos para la fecha {fecha}"}) # ── Login TNS ─────────────────────────────────────────────────────────────