diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index 230d8fad..f1e60163 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -414,7 +414,8 @@ def do_formsemestre_createwithmodules(edit=False): "explanation": "associé(s) au résultat du semestre (ex: VRTW1). Inutile en BUT. Séparés par des virgules.", "allow_null": not sco_preferences.get_preference( "always_require_apo_sem_codes" - ), + ) + or formsemestre.modalite == "EXT", }, ) ) @@ -427,7 +428,8 @@ def do_formsemestre_createwithmodules(edit=False): "explanation": "associé(s) au résultat de l'année (ex: VRT1A). Séparés par des virgules.", "allow_null": not sco_preferences.get_preference( "always_require_apo_sem_codes" - ), + ) + or formsemestre.modalite == "EXT", }, ) ) @@ -740,8 +742,13 @@ def do_formsemestre_createwithmodules(edit=False): # check dates if ndb.DateDMYtoISO(tf[2]["date_debut"]) > ndb.DateDMYtoISO(tf[2]["date_fin"]): msg = '' - if sco_preferences.get_preference("always_require_apo_sem_codes") and not any( - [tf[2]["etape_apo" + str(n)] for n in range(0, scu.EDIT_NB_ETAPES + 1)] + if ( + formsemestre.modalite + != "EXT" # n'impose pas d'Apo pour les sem. extérieurs + and sco_preferences.get_preference("always_require_apo_sem_codes") + and not any( + [tf[2]["etape_apo" + str(n)] for n in range(0, scu.EDIT_NB_ETAPES + 1)] + ) ): msg = ''