From 9bbaeab1ef166d70bd552cf883d6b559ffae01fb Mon Sep 17 00:00:00 2001 From: Alejandro Lara Date: Mon, 9 Sep 2024 21:49:32 +0000 Subject: [PATCH] Historial actualizado on conflict --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 97f5562..c608310 100644 --- a/app.py +++ b/app.py @@ -45,7 +45,7 @@ def extract(username: str, password: str): insert_query = """ INSERT INTO public.alumno_extraccion ("Usuario_claveULSA", datos_html, materias_html, historial_html, materias_actuales_html) VALUES (%s, TRIM(%s), TRIM(%s), TRIM(%s)::JSONB, TRIM(%s)) - ON CONFLICT ("Usuario_claveULSA") DO UPDATE SET datos_html = EXCLUDED.datos_html, materias_html = EXCLUDED.materias_html, error_message = NULL, registrado = DEFAULT; + ON CONFLICT ("Usuario_claveULSA") DO UPDATE SET datos_html = EXCLUDED.datos_html, materias_html = EXCLUDED.materias_html, error_message = NULL, registrado = DEFAULT, historial_html = EXCLUDED.historial_html; """ cur.execute(insert_query, (username_integer, datos_html, materias_html, historial_html, materias_actuales_html))