diff --git a/app/__init__.py b/app/__init__.py index 848d5146d..4e0cbb048 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 a5cd8af5d..f504a37c1 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/<dept_id>/Scolarite/Notes/formsemestre_status") +@bp.route("/ScoDoc/<dept_id>/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<dept_id> """ diff --git a/app/templates/main/index.html b/app/templates/main/index.html index c3724c28e..ac9bcebf9 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</li> - <li><a href="{{ url_for('main.formsemestre_status', dept_id='RT') }}"><tt>formsemestre_status</tt></a> : a-t-on + <li><a href="{{ url_for('main.formsemestre_statux', dept_id='RT') }}"><tt>formsemestre_statux</tt></a> : a-t-on le rôle EnsRT ? </li> <li><a href="ScoDoc/RT/Scolarite/Notes/essai"><tt>Notes/essai</tt> : test "notes", url