Update app.py
Browse files
app.py
CHANGED
@@ -52,6 +52,14 @@ def main():
|
|
52 |
st.session_state.username = None
|
53 |
st.session_state.role = None
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
# Verificar la conexi贸n a MongoDB
|
56 |
if not initialize_mongodb_connection():
|
57 |
st.warning("La conexi贸n a la base de datos MongoDB no est谩 disponible. Algunas funciones pueden no estar operativas.")
|
|
|
52 |
st.session_state.username = None
|
53 |
st.session_state.role = None
|
54 |
|
55 |
+
# Inicializaci贸n de las conexiones a la base de datos
|
56 |
+
if 'db_initialized' not in st.session_state:
|
57 |
+
st.session_state.db_initialized = initialize_database_connections()
|
58 |
+
|
59 |
+
if not st.session_state.db_initialized:
|
60 |
+
st.error("Error initializing database connections")
|
61 |
+
st.stop()
|
62 |
+
|
63 |
# Verificar la conexi贸n a MongoDB
|
64 |
if not initialize_mongodb_connection():
|
65 |
st.warning("La conexi贸n a la base de datos MongoDB no est谩 disponible. Algunas funciones pueden no estar operativas.")
|