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-1335 => QA] Doctorate > cotutelle > fix the display of a selected institute #2297

Open
wants to merge 1 commit into
base: qa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions forms/admission/doctorate/cotutelle.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ def get_superior_institute_initial_choices(self, institute_id):
street=F('entityversionaddress__street'),
street_number=F('entityversionaddress__street_number'),
zipcode=F('entityversionaddress__postal_code'),
).get(organization_uuid=institute_id)

).filter(organization_uuid=institute_id).order_by('-start_date').first()
return EMPTY_CHOICE + ((institute.organization_uuid, format_school_title(school=institute)),)

def clean(self):
Expand Down
6 changes: 0 additions & 6 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1215,9 +1215,6 @@ msgid ""
"number"
msgstr ""

msgid "Canvas"
msgstr ""

msgid "Carbon-copy the CA members"
msgstr ""

Expand Down Expand Up @@ -1494,9 +1491,6 @@ msgstr ""
msgid "Confirmation exam date"
msgstr ""

msgid "Confirmation success attestation"
msgstr ""

msgid "Contact"
msgstr ""

Expand Down
26 changes: 0 additions & 26 deletions locale/fr_BE/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1330,9 +1330,6 @@ msgstr ""
"Vous ne pouvez pas rejeter la fusion car au moins une personne connue a le "
"même numéro de registre national"

msgid "Canvas"
msgstr "Canvas"

msgid "Carbon-copy the CA members"
msgstr "Mettre en copie les membres du groupe de supervision"

Expand Down Expand Up @@ -1626,9 +1623,6 @@ msgstr "Épreuve de confirmation"
msgid "Confirmation exam date"
msgstr "Date de l'épreuve de confirmation"

msgid "Confirmation success attestation"
msgstr "Attestation de réussite de l'épreuve de confirmation"

msgid "Contact"
msgstr "Contact"

Expand Down Expand Up @@ -8509,23 +8503,3 @@ msgstr ""
#, python-brace-format
msgid "{items} types out of {total}"
msgstr "{items} types sur {total}"

#~ msgid "CDD"
#~ msgstr "CDD"

#, python-format
#~ msgid "Change <em>%(name)s</em> configuration"
#~ msgstr "Modifier la configuration de <em>%(name)s</em>"

#, python-format
#~ msgid "Change <em>%(name)s</em> custom mail template"
#~ msgstr "Modifier le template d'email personnalisé <em>%(name)s</em>"

#~ msgid "Role: ADRE Secretaries"
#~ msgstr "Rôle: Secrétaires ADRE"

#~ msgid "Role: ADRE secretary"
#~ msgstr "Rôle: Secrétaire ADRE"

#~ msgid "Template title"
#~ msgstr "Intitulé du template"
12 changes: 6 additions & 6 deletions templatetags/admission.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
CONTEXT_CONTINUING,
CONTEXT_DOCTORATE_AFTER_ENROLMENT,
)
from admission.models import ContinuingEducationAdmission, DoctorateAdmission, GeneralEducationAdmission
from admission.models.base import BaseAdmission
from admission.ddd.admission.doctorat.preparation.domain.model.enums import (
ChoixStatutPropositionDoctorale,
)
Expand Down Expand Up @@ -112,14 +110,15 @@
ADMISSION_CONTEXT_BY_OSIS_EDUCATION_TYPE,
AnneeInscriptionFormationTranslator,
)
from admission.models import ContinuingEducationAdmission, DoctorateAdmission, GeneralEducationAdmission
from admission.models.base import BaseAdmission
from admission.utils import (
get_access_conditions_url,
get_experience_urls,
get_superior_institute_queryset,
format_school_title,
)
from base.forms.utils.file_field import PDF_MIME_TYPE
from base.models.entity_version import EntityVersion
from base.models.enums.civil_state import CivilState
from base.models.person import Person
from ddd.logic.financabilite.domain.model.enums.etat import EtatFinancabilite
Expand Down Expand Up @@ -1669,9 +1668,10 @@ def osis_language_name(code):
def superior_institute_name(organization_uuid):
if not organization_uuid:
return ''
try:
institute = get_superior_institute_queryset().get(organization_uuid=organization_uuid)
except EntityVersion.DoesNotExist:
institute = (
get_superior_institute_queryset().filter(organization_uuid=organization_uuid).order_by('-start_date').first()
)
if not institute:
return organization_uuid
return mark_safe(format_school_title(institute))

Expand Down