fix: verificar rows_ps en condicion de datos vacios para no saltar paso 3

This commit is contained in:
Lizandro Guarnizo
2026-07-10 21:39:11 -05:00
parent 316205466f
commit 2794e9f9dd
+1 -1
View File
@@ -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 ─────────────────────────────────────────────────────────────