Update app.py
Browse files
app.py
CHANGED
@@ -52,15 +52,12 @@ def mostrar_detalles(normativa_seleccionada):
|
|
52 |
if not normativa_seleccionada:
|
53 |
return "<p>Por favor selecciona una normativa</p>", None
|
54 |
normativas = cargar_normativas()
|
55 |
-
# Extraer el ID que est谩 al final del string
|
56 |
partes = normativa_seleccionada.split()
|
57 |
-
id_normativa =
|
58 |
-
# Buscar la normativa con ese ID
|
59 |
for normativa in normativas["normativa_peruana_gestion_riesgos"]:
|
60 |
-
if normativa[
|
61 |
-
# Crear HTML con la informaci贸n detallada
|
62 |
html = crear_html(normativa)
|
63 |
-
return html
|
64 |
|
65 |
def cargar_desde_airtable():
|
66 |
response = requests.get(url, headers=headers)
|
|
|
52 |
if not normativa_seleccionada:
|
53 |
return "<p>Por favor selecciona una normativa</p>", None
|
54 |
normativas = cargar_normativas()
|
|
|
55 |
partes = normativa_seleccionada.split()
|
56 |
+
id_normativa = normativa['nombre']
|
|
|
57 |
for normativa in normativas["normativa_peruana_gestion_riesgos"]:
|
58 |
+
if id_normativa == normativa['nombre']:
|
|
|
59 |
html = crear_html(normativa)
|
60 |
+
return html
|
61 |
|
62 |
def cargar_desde_airtable():
|
63 |
response = requests.get(url, headers=headers)
|