Your career: the end-before-start error is English in every language, and only Experience has it #621

Closed
opened 2026-10-01 10:48:26 +00:00 by tiagoagueda · 0 comments
Owner

Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the career entry forms and trying them against the test settings.

Checked again on 2026-10-01 against main at 0a5cad587: still present.

ExperienceForm.clean refuses an end date before the start date with a bare string that is not wrapped in gettext, so no catalogue has it and every interface language shows it in English. The candidate-file review repeats form errors as its notes, so the English sentence appears there too. The other dated entries do not check the order of their dates at all.

  • Where: resume/forms.py:90-95 (ExperienceForm.clean: forms.ValidationError("This is before the start date.")); resume/forms.py:98-124 (EducationForm), :127-144 (ProjectForm), :192-201 (CertificationForm, issued_on and expires_on), none of which defines clean; the models (resume/models.py) have no clean or constraint either.
  • What happens: with Portuguese active, an Experience ending in 2021 and starting in 2023 is refused with "This is before the start date." in English; grep finds the string in no .po file. The same dates on an Education or a Project, or a certificate that expires before it was issued, are accepted without comment, on the page and through the candidate-file import, which runs the same forms.
  • Why it matters: the one check that exists shows English to every other language, and three kinds of entry can be saved with impossible dates, which a CV then prints.
  • Fix: move the check into ResumeItemForm (or a small mixin), keyed by each model's start and end field names (start_date/end_date, issued_on/expires_on), with the message in gettext_lazy; apply it to Education, Project and Certification; run makemessages.

Done when

  • A new test file, tests/test_career_dates.py, shows Education, Project and Certification forms refusing an end before the start, and the Experience error coming back translated with a non-English language active.
Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the career entry forms and trying them against the test settings. Checked again on 2026-10-01 against `main` at `0a5cad587`: still present. `ExperienceForm.clean` refuses an end date before the start date with a bare string that is not wrapped in `gettext`, so no catalogue has it and every interface language shows it in English. The candidate-file review repeats form errors as its notes, so the English sentence appears there too. The other dated entries do not check the order of their dates at all. - **Where:** `resume/forms.py:90-95` (`ExperienceForm.clean`: `forms.ValidationError("This is before the start date.")`); `resume/forms.py:98-124` (`EducationForm`), `:127-144` (`ProjectForm`), `:192-201` (`CertificationForm`, `issued_on` and `expires_on`), none of which defines `clean`; the models (`resume/models.py`) have no `clean` or constraint either. - **What happens:** with Portuguese active, an Experience ending in 2021 and starting in 2023 is refused with "This is before the start date." in English; `grep` finds the string in no `.po` file. The same dates on an Education or a Project, or a certificate that expires before it was issued, are accepted without comment, on the page and through the candidate-file import, which runs the same forms. - **Why it matters:** the one check that exists shows English to every other language, and three kinds of entry can be saved with impossible dates, which a CV then prints. - **Fix:** move the check into `ResumeItemForm` (or a small mixin), keyed by each model's start and end field names (`start_date`/`end_date`, `issued_on`/`expires_on`), with the message in `gettext_lazy`; apply it to Education, Project and Certification; run `makemessages`. ## Done when - A new test file, `tests/test_career_dates.py`, shows Education, Project and Certification forms refusing an end before the start, and the Experience error coming back translated with a non-English language active.
tiagoagueda added this to the 0.6.0 milestone 2026-10-01 10:48:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#621
No description provided.