Fix: retour après formulaire saisie notes

This commit is contained in:
Emmanuel Viennet 2021-08-21 13:40:47 +02:00
parent 29b44ad5a4
commit e54e8147a8
2 changed files with 10 additions and 3 deletions

View File

@ -1175,7 +1175,6 @@ def _form_saisie_notes(E, M, group_ids, destination="", REQUEST=None):
)
)
#
breakpoint()
H = []
if nb_decisions > 0:
H.append(
@ -1193,11 +1192,17 @@ def _form_saisie_notes(E, M, group_ids, destination="", REQUEST=None):
REQUEST.form,
descr,
initvalues=initvalues,
submitlabel="Terminer",
submitbutton=False,
formid="formnotes",
method="GET",
)
H.append(tf.getform()) # check and init
H.append(
f"""<a href="{url_for("notes.moduleimpl_status", scodoc_dept=g.scodoc_dept,
moduleimpl_id=M["moduleimpl_id"])
}" class="btn btn-primary">Terminer</a>
"""
)
if tf.canceled():
return None
elif (not tf.submitted()) or not tf.result:

View File

@ -56,14 +56,16 @@ class DevConfig(Config):
SQLALCHEMY_DATABASE_URI = (
os.environ.get("SCODOC_DEV_DATABASE_URI") or "postgresql:///SCODOC_DEV"
)
SECRET_KEY = os.environ.get("DEV_SECRET_KEY") or "bb3faec7d9a34eb68a8e3e710087d87a"
class TestConfig(DevConfig):
SQLALCHEMY_DATABASE_URI = (
os.environ.get("SCODOC_TEST_DATABASE_URI") or "postgresql:///SCODOC_TEST"
)
SERVER_NAME = "test.gr"
SERVER_NAME = os.environ.get("SCODOC_TEST_SERVER_NAME") or "test.gr"
DEPT_TEST = "TEST_" # nom du département, ne pas l'utiliser pour un "vrai"
SECRET_KEY = os.environ.get("TEST_SECRET_KEY") or "c7ecff5db1594c208f573ff30e0f6bca"
mode = os.environ.get("FLASK_ENV", "production")