1
0
forked from ScoDoc/ScoDoc

default formsemestre modality

This commit is contained in:
IDK 2021-08-12 13:54:56 +02:00
parent 3a6b30d99d
commit 56d708569d
3 changed files with 12 additions and 4 deletions

View File

@ -102,14 +102,20 @@ class NotesFormModalite(db.Model):
__tablename__ = "notes_form_modalites"
DEFAULT_MODALITE = "FI"
id = db.Column(db.Integer, primary_key=True)
modalite = db.Column(db.String(16), unique=True, index=True) # code
modalite = db.Column(
db.String(16),
unique=True,
index=True,
default=DEFAULT_MODALITE,
server_default=DEFAULT_MODALITE,
) # code
titre = db.Column(db.Text()) # texte explicatif
# numero = ordre de presentation)
numero = db.Column(db.Integer)
DEFAULT_MODALITE = "FI"
@staticmethod
def insert_modalites():
"""Create default modalities"""

View File

@ -48,6 +48,7 @@ def test_client():
yield client
# ndb.close_dept_connection()
# Teardown:
db.session.commit()
db.session.remove()
clear_scodoc_cache()
# db.drop_all()

View File

@ -18,6 +18,7 @@ import typing
import scodoc_manager
from config import Config
from app.auth.models import User
from app.models import NotesFormModalite
from app.scodoc import notesdb as ndb
from app.scodoc import sco_codes_parcours
from app.scodoc import sco_edit_formation
@ -228,7 +229,7 @@ class ScoFake(object):
bul_hide_xml=None,
gestion_semestrielle=None,
bul_bgcolor=None,
modalite=None,
modalite=NotesFormModalite.DEFAULT_MODALITE,
resp_can_edit=None,
resp_can_change_ens=None,
ens_can_edit_eval=None,