From 6876f2e90230e9e0958511a72f683d305a1949e7 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 27 Feb 2023 10:43:50 +0100 Subject: [PATCH] Ignore CAS config during fresh database upgrade --- app/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 856dd8ea..f929468e 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -383,8 +383,12 @@ def create_app(config_class=DevConfig): from app.auth.cas import set_cas_configuration with app.app_context(): - set_cas_configuration(app) - + try: + set_cas_configuration(app) + except sqlalchemy.exc.ProgrammingError: + # Si la base n'a pas été upgradée (arrive durrant l'install) + # il se peut que la table scodoc_site_config n'existe pas encore. + pass return app