From a57d0bc3fd2e45e0275f9f113329b450ab84423c Mon Sep 17 00:00:00 2001 From: Etienne Delclaux Date: Fri, 10 Jan 2025 17:42:07 +0100 Subject: [PATCH] feat: add a relation between 'FRONTEND.ENABLE_PROFILES' and 'SYNTHESE.TAXON_SHEET.ENABLE_TAB_PROFILES' --- backend/geonature/utils/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/geonature/utils/config.py b/backend/geonature/utils/config.py index 34acffb504..912b73aadb 100644 --- a/backend/geonature/utils/config.py +++ b/backend/geonature/utils/config.py @@ -33,6 +33,11 @@ except ValidationError as e: raise ConfigError(CONFIG_FILE, e.messages) +# Handle consistency inside the frontend config + +if(config_frontend["SYNTHESE"]["TAXON_SHEET"]["ENABLE_TAB_PROFILES"] and not config_frontend["FRONTEND"]["ENABLE_PROFILES"]): + config_frontend["SYNTHESE"]["TAXON_SHEET"]["ENABLE_TAB_PROFILES"] = False + config_default = { # disable cache for downloaded files (PDF file stat for ex) # TODO: use Flask.get_send_file_max_age(filename) to return 0 only for generated PDF files