fix(scanner): escaneo foto-primero para QR DNI 2026 y PDF417 con prevencion de parpadeos

This commit is contained in:
Carlos Tello
2026-10-14 09:17:21 -03:00
parent ffa8a2a684
commit 0e2ea24f05
2 changed files with 678 additions and 334 deletions
@@ -68,7 +68,13 @@ class AccessRepository:
with db_session() as conn:
cursor = conn.cursor()
cursor.execute("SELECT COALESCE(MAX(PersonaID), 0) + 1 FROM Per")
cursor.execute("""
SELECT COALESCE(MAX(max_id), 0) + 1 FROM (
SELECT MAX(PersonaID) AS max_id FROM Per
UNION
SELECT MAX(PersonaID) AS max_id FROM PerDocCatVal
) AS t
""")
new_pid = cursor.fetchone()[0]
sql_per = """
File diff suppressed because it is too large Load Diff