Fix get_firebird_from_config call in test_rda (returns tuple fb, ok, msg)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-26 19:06:32 -05:00
co-authored by Claude Sonnet 4.6
parent c64a68ec6f
commit c2977011ee
+6 -8
View File
@@ -77,10 +77,9 @@ async def get_candidatos(request: Request, user: dict = Depends(get_current_user
cfg = {r[0]: r[1] for r in db.execute("SELECT key, value FROM config").fetchall()}
db.close()
fb = get_firebird_from_config(cfg)
ok, err = fb.connect()
if not ok:
return JSONResponse({"error": f"Error Firebird: {err}"})
fb, fb_ok, fb_msg = get_firebird_from_config(cfg)
if not fb_ok:
return JSONResponse({"error": f"Error Firebird: {fb_msg}"})
sql = _SQL_CANDIDATOS
params = {}
@@ -146,10 +145,9 @@ async def test_enviar(request: Request, user: dict = Depends(get_current_user)):
prefijo_def = cfg.get("prefijo_tns_default", "00")
api_sucursal = cfg.get("api_sucursal", "00") or "00"
fb = get_firebird_from_config(cfg)
ok, err = fb.connect()
if not ok:
return JSONResponse({"error": f"Error Firebird: {err}"})
fb, fb_ok, fb_msg = get_firebird_from_config(cfg)
if not fb_ok:
return JSONResponse({"error": f"Error Firebird: {fb_msg}"})
if modo == "factura":
where = "r.NUM_FACTURA = :val"