Your career: a skill saved without a group is shown nowhere, not on the overview, the preview or a CV #617

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

Found on 2026-09-29 in a read-only review of postulo at 95348908d, following how skills are drawn on each page, and settled by posting the skill form in a test.

Checked again on 2026-10-01 against main at 0a5cad587: still present. The code is now at documents/rendering.py:39-47 and documents/rendering.py:311-312; the other locations are where they were.

Skill.group is optional and the skill form offers it with a blank default, but every page draws skills only through their group. A skill saved without one is acknowledged with Added. and then appears on no page: it cannot be seen, edited or deleted except by typing its address.

  • Where: resume/models.py:149-156 (group = models.ForeignKey(..., null=True, blank=True)); resume/forms.py:153-189 (SkillForm, fields = ("name", "group", "order")); resume/registry.py:83-91 (OVERVIEW_ORDER lists skill-group, not skill); templates/resume/overview.html:143-157 (skills drawn only as item.skills.all under each group, and the Add a skill link there passes no group); resume/views.py:342-349 (the preview passes only skill_groups); documents/rendering.py:32-40 and :337-338, templates/documents/themes/base_cv.html:59-62 (a CV prints skills only as a group's skill_names). resume/views.py:87 builds context["skills"] for the overview, and no template reads it.
  • What happens: on Your career a person presses Add a skill under Languages, types a name and saves without choosing a group, since the link they followed implied one. Checked: the post answers 302 to the overview, the row is stored with group_id None, and the name appears neither on the overview nor on the preview. Skills read from a candidate file whose entry names no group_id are added ungrouped the same way (resume/candidate.py:1118-1122, :1349).
  • Why it matters: entries a person typed go missing from their career record and from every CV built on it, without any sign that anything went wrong.
  • Fix: pick one rule and apply it everywhere. Either require the group on SkillForm (with the candidate importer refusing, or filing under a named default group, a skill whose file names none), or draw ungrouped skills: an Other skills block on the overview, the preview and CVs, fed by the query already in context["skills"]. Either way, have the Add a skill link under a group pass ?group=<pk> and use it as the form's initial value.

Done when

  • A test in tests/test_career_sections.py saves a skill with no group and then finds it on the overview (or, under the other rule, is refused by the form), and a test shows that Add a skill under a group opens the form with that group chosen.
Found on 2026-09-29 in a read-only review of postulo at 95348908d, following how skills are drawn on each page, and settled by posting the skill form in a test. Checked again on 2026-10-01 against `main` at `0a5cad587`: still present. The code is now at `documents/rendering.py:39-47` and `documents/rendering.py:311-312`; the other locations are where they were. `Skill.group` is optional and the skill form offers it with a blank default, but every page draws skills only through their group. A skill saved without one is acknowledged with *Added.* and then appears on no page: it cannot be seen, edited or deleted except by typing its address. - **Where:** `resume/models.py:149-156` (`group = models.ForeignKey(..., null=True, blank=True)`); `resume/forms.py:153-189` (`SkillForm`, `fields = ("name", "group", "order")`); `resume/registry.py:83-91` (`OVERVIEW_ORDER` lists `skill-group`, not `skill`); `templates/resume/overview.html:143-157` (skills drawn only as `item.skills.all` under each group, and the *Add a skill* link there passes no group); `resume/views.py:342-349` (the preview passes only `skill_groups`); `documents/rendering.py:32-40` and `:337-338`, `templates/documents/themes/base_cv.html:59-62` (a CV prints skills only as a group's `skill_names`). `resume/views.py:87` builds `context["skills"]` for the overview, and no template reads it. - **What happens:** on *Your career* a person presses *Add a skill* under *Languages*, types a name and saves without choosing a group, since the link they followed implied one. Checked: the post answers 302 to the overview, the row is stored with `group_id` `None`, and the name appears neither on the overview nor on the preview. Skills read from a candidate file whose entry names no `group_id` are added ungrouped the same way (`resume/candidate.py:1118-1122`, `:1349`). - **Why it matters:** entries a person typed go missing from their career record and from every CV built on it, without any sign that anything went wrong. - **Fix:** pick one rule and apply it everywhere. Either require the group on `SkillForm` (with the candidate importer refusing, or filing under a named default group, a skill whose file names none), or draw ungrouped skills: an *Other skills* block on the overview, the preview and CVs, fed by the query already in `context["skills"]`. Either way, have the *Add a skill* link under a group pass `?group=<pk>` and use it as the form's initial value. ## Done when - A test in `tests/test_career_sections.py` saves a skill with no group and then finds it on the overview (or, under the other rule, is refused by the form), and a test shows that *Add a skill* under a group opens the form with that group chosen.
tiagoagueda added this to the 0.5.0 milestone 2026-10-01 10:48:25 +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#617
No description provided.