1
0
forked from ScoDoc/ScoDoc

Misc fix for unit tests

This commit is contained in:
Emmanuel Viennet 2024-07-18 16:54:48 +02:00
parent d76fdfefbe
commit 98127e7c1d
6 changed files with 8 additions and 6 deletions

View File

@ -16,7 +16,7 @@ from flask import request
from flask_json import as_json
from flask_login import login_required
from app import db
from app import db, log
from app.api import api_bp as bp, API_CLIENT_ERROR
from app.api import api_permission_required as permission_required
from app.decorators import scodoc

View File

@ -520,7 +520,9 @@ def formation_module_set_code_apogee(
code_apogee = code_apogee.strip("-_ \t")[:APO_CODE_STR_LEN] # tronque
log(f"API module_set_code_apogee: module_id={module.id} code_apogee={code_apogee}")
log(
f"API formation_module_set_code_apogee: module_id={module.id} code_apogee={code_apogee}"
)
module.code_apogee = code_apogee
db.session.add(module)

View File

@ -1370,7 +1370,7 @@ def _ue_table_modules(
"%(heures_cours)s/%(heures_td)s/%(heures_tp)s, coef. %(coefficient)s" % mod
)
edit_url = url_for(
"apiweb.module_set_code_apogee",
"apiweb.formation_module_set_code_apogee",
scodoc_dept=g.scodoc_dept,
module_id=mod["module_id"],
)

View File

@ -163,7 +163,7 @@ def formation_table_recap(formation: Formation, fmt="html") -> Response:
url_for('apiweb.ue_set_code_apogee', scodoc_dept=g.scodoc_dept)
}"
data-apo_mod_save_url="{
url_for('apiweb.module_set_code_apogee', scodoc_dept=g.scodoc_dept)
url_for('apiweb.formation_module_set_code_apogee', scodoc_dept=g.scodoc_dept)
}"
""",
html_with_td_classes=True,

View File

@ -56,7 +56,7 @@
({{mod.heures_cours|default(" ",true)|safe}}/{{mod.heures_td|default(" ",true)|safe}}/{{mod.heures_tp|default(" ",true)|safe}},
{% else %}
({% endif %}Apo:<span class="{% if editable %}span_apo_edit{% endif %}"
data-url="{{url_for('apiweb.module_set_code_apogee',
data-url="{{url_for('apiweb.formation_module_set_code_apogee',
scodoc_dept=g.scodoc_dept, module_id=mod.id)
}}" id="{{mod.id}}" data-placeholder="{{scu.APO_MISSING_CODE_STR}}">
{{mod.code_apogee|default("", true)}}</span>)

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.7.2"
SCOVERSION = "9.7.4"
SCONAME = "ScoDoc"