fix(automation): guardar mensaje_tns en _guardar_envio; eliminar script tmp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-22 23:01:27 -05:00
co-authored by Claude Sonnet 4.6
parent 36ace04c35
commit 66d44392ee
2 changed files with 3 additions and 24 deletions
+3 -2
View File
@@ -797,8 +797,8 @@ def _guardar_envio(user_id, tipo, factura, json_data, respuesta, ok,
conn.execute("""
INSERT INTO envios (user_id, tipo, factura, idrecepcion, contrato, cedula,
fecha_inicio, fecha_fin,
pacientes_count, servicios_count, status, json_enviado, respuesta_api, created_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
pacientes_count, servicios_count, status, json_enviado, respuesta_api, mensaje_tns, created_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""", (
user_id, tipo, factura, idrecepcion, contrato, cedula,
fecha_inicio, fecha_fin,
@@ -806,6 +806,7 @@ def _guardar_envio(user_id, tipo, factura, json_data, respuesta, ok,
"success" if ok else "error",
json_lib.dumps(json_data, indent=2, ensure_ascii=False)[:10000],
respuesta[:1000] if respuesta else "",
respuesta[:300] if respuesta else "",
datetime.now().isoformat(),
))
conn.commit()