Ignore CAS config during fresh database upgrade

This commit is contained in:
Emmanuel Viennet 2023-02-27 10:43:50 +01:00
parent 5722ed6f93
commit 6876f2e902

View File

@ -383,8 +383,12 @@ def create_app(config_class=DevConfig):
from app.auth.cas import set_cas_configuration from app.auth.cas import set_cas_configuration
with app.app_context(): with app.app_context():
try:
set_cas_configuration(app) 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 return app