-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OS-598] Doctorate checklist > add the fac decision tab #2065
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Les changements dans la décision FAC ont impacté la décision SIC mais pour éviter d'avoir à modifier dans cette PR, tout ce qui est lié à la décision SIC, j'ai simplement retiré temporairement les tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parlons-nous vraiment de décision FAC dans doctorat?
Ce n'est pas plutot décision CDD ?
d459b28
to
7f19138
Compare
autres_motifs_refus: List[str] | ||
class ShouldSpecifierInformationsAcceptationParSIC(BusinessValidator): | ||
nombre_annees_prevoir_programme: Optional[int] | ||
|
||
def validate(self, *args, **kwargs): | ||
if not self.motifs_refus and not self.autres_motifs_refus: | ||
raise MotifRefusFacultaireNonSpecifieException | ||
if not self.nombre_annees_prevoir_programme: | ||
raise InformationsAcceptationSICNonSpecifieesException | ||
|
||
|
||
@attr.dataclass(frozen=True, slots=True) | ||
class ShouldSpecifierInformationsAcceptationFacultaire(BusinessValidator): | ||
avec_conditions_complementaires: Optional[bool] | ||
conditions_complementaires_existantes: List[ConditionComplementaireApprobationIdentity] | ||
conditions_complementaires_libres: List[ConditionComplementaireLibreApprobation] | ||
|
||
avec_complements_formation: Optional[bool] | ||
complements_formation: Optional[List[ComplementFormationIdentity]] | ||
|
||
nombre_annees_prevoir_programme: Optional[int] | ||
|
||
def validate(self, *args, **kwargs): | ||
if ( | ||
self.avec_conditions_complementaires is None | ||
or self.avec_conditions_complementaires | ||
and not (self.conditions_complementaires_libres or self.conditions_complementaires_existantes) | ||
or not self.nombre_annees_prevoir_programme | ||
): | ||
raise InformationsAcceptationFacultaireNonSpecifieesException | ||
|
||
|
||
@attr.dataclass(frozen=True, slots=True) | ||
class ShouldSpecifierInformationsAcceptationFacultaireInscription(BusinessValidator): | ||
avec_conditions_complementaires: Optional[bool] | ||
conditions_complementaires_existantes: List[ConditionComplementaireApprobationIdentity] | ||
conditions_complementaires_libres: List[ConditionComplementaireLibreApprobation] | ||
|
||
def validate(self, *args, **kwargs): | ||
if self.avec_conditions_complementaires and not ( | ||
self.conditions_complementaires_libres or self.conditions_complementaires_existantes | ||
): | ||
if not self.nombre_annees_prevoir_programme: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ces deux valdateurs sont identiques non ?
@@ -671,9 +677,102 @@ def clean(self): | |||
return cleaned_data | |||
|
|||
|
|||
class DoctorateFacDecisionApprovalForm(FacDecisionApprovalForm): | |||
class Meta(FacDecisionApprovalForm.Meta): | |||
class DoctorateFacDecisionApprovalForm(forms.ModelForm): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y'avait rien de réutilisable dans FacDecisionApprovalForm et SIC. ?
No description provided.