diff --git a/app/__init__.py b/app/__init__.py index 848d5146..4e0cbb04 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -42,7 +42,7 @@ moment = Moment() @app.before_request def open_dept_db_connection(): # current_app.logger.info("open_dept_db_connection") - if hasattr(g, "scodoc_dept") and not hasattr(g, "db_conn"): + if hasattr(g, "scodoc_dept") and not hasattr(g, "db_conn") and g.scodoc_dept: g.db_conn = ndb.open_dept_connection() diff --git a/app/main/routes.py b/app/main/routes.py index a5cd8af5..f504a37c 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -141,9 +141,9 @@ def a_zope_form_post(REQUEST=None): return "\n".join(H) -@bp.route("/ScoDoc//Scolarite/Notes/formsemestre_status") +@bp.route("/ScoDoc//Scolarite/Notes/formsemestre_statux") @scodoc7func(context) -def formsemestre_status(dept_id=None, formsemestre_id=None, REQUEST=None): +def formsemestre_statux(dept_id=None, formsemestre_id=None, REQUEST=None): """Essai méthode de département Le contrôle d'accès doit vérifier les bons rôles : ici Ens """ diff --git a/app/templates/main/index.html b/app/templates/main/index.html index c3724c28..ac9bcebf 100644 --- a/app/templates/main/index.html +++ b/app/templates/main/index.html @@ -28,7 +28,7 @@ non protégé renvoyant vers une page protégée -
  • formsemestre_status : a-t-on +
  • formsemestre_statux : a-t-on le rôle EnsRT ?
  • Notes/essai : test "notes", url