Skip to content
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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jcougnaud
Copy link
Contributor

No description provided.

Copy link
Contributor Author

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.

Copy link
Contributor

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 ?

Comment on lines -85 to +90
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:
Copy link
Contributor

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):
Copy link
Contributor

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. ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants