From 417cb53603917eb5621fb6140dfc2d3130317007 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 25 Jan 2022 22:18:49 +0100 Subject: [PATCH] corrections post-merge --- app/models/__init__.py | 2 +- app/models/config.py | 5 +++++ app/models/formsemestre.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/__init__.py b/app/models/__init__.py index 25ac6c116..f11084934 100644 --- a/app/models/__init__.py +++ b/app/models/__init__.py @@ -12,7 +12,6 @@ GROUPNAME_STR_LEN = 64 from app.models.raw_sql_init import create_database_functions from app.models.absences import Absence, AbsenceNotification, BilletAbsence -from app.models.config import ScoDocSiteConfig from app.models.departements import Departement from app.models.etudiants import ( Identite, @@ -65,3 +64,4 @@ from app.models.but_refcomp import ( ApcSituationPro, ApcAppCritique, ) +from app.models.config import ScoDocSiteConfig diff --git a/app/models/config.py b/app/models/config.py index f9345942f..c69b5ae60 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -110,6 +110,11 @@ class ScoDocSiteConfig(db.Model): else: return klass.name + @classmethod + def get_bonus_sport_class(cls): + """Get configured bonus function, or None if None.""" + return cls.get_bonus_sport_class_from_name() + @classmethod def get_bonus_sport_class_from_name(cls, class_name=None): """returns bonus class with specified name. diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 4d436f8e8..a6016031e 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -49,7 +49,7 @@ class FormSemestre(db.Model): gestion_compensation = db.Column( db.Boolean(), nullable=False, default=False, server_default="false" ) - # ne publie pas le bulletin XML: + # ne publie pas le bulletin XML ou JSON: bul_hide_xml = db.Column( db.Boolean(), nullable=False, default=False, server_default="false" )