1
0
forked from ScoDoc/ScoDoc

check env var SCODOC_ADMIN_MAIL

This commit is contained in:
Emmanuel Viennet 2021-08-19 23:43:14 +02:00
parent 698e5b7e22
commit bb75fef1f6
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,7 @@ FLASK_ENV=production # ou "development" si vous développez
# MAIL_SERVER=localhost
# MAIL_PORT=25
# Obligatoire:
SCODOC_ADMIN_MAIL="emmanuel@viennet.net"
# Remplacer cette chaine

View File

@ -71,6 +71,11 @@ def db_init(): # db-init
Starts from an existing database and create all
the necessary SQL tables and functions.
"""
if not app.config.get("SCODOC_ADMIN_MAIL"):
sys.stderr.write(
"""La variable SCODOC_ADMIN_MAIL n'est pas positionnée: vérifier votre .env"""
)
return 100
initialize_scodoc_database()