Summary
Resumes appear on the Profile page but not in the Resume dropdown when creating or editing a job. Users cannot assign a resume to a job. Saving with an empty/invalid resumeId can also fail with Prisma error P2003.
Steps to reproduce
- Create a resume on Profile (including one with fewer than 2 sections).
- Open My Jobs → Add Job (or edit an existing job).
- Open the Resume dropdown.
Expected
All resumes belonging to the logged-in user appear in the dropdown (same set as Profile), and leaving Resume unselected saves with resumeId = null.
Actual
- Dropdown is empty (or missing resumes that Profile shows), because the job form filters with
MIN_RESUME_SECTIONS_FOR_SELECTION (2) while Profile uses minSections = 0.
- Submitting an empty string for
resume writes Job.resumeId = "" instead of null, which can trigger Prisma P2003 (foreign key constraint).
- Create/update job does not validate that the selected resume belongs to the current user.
Suggested fix
- Load the logged-in user’s resumes for the job form dropdown (no section-count filter for assignment).
- Normalize empty resume/cover-letter selections to
null.
- Validate resume ownership before create/update.
Related
Not covered by existing issues (checked #76, #71, #49, #11 — different problems).
Summary
Resumes appear on the Profile page but not in the Resume dropdown when creating or editing a job. Users cannot assign a resume to a job. Saving with an empty/invalid
resumeIdcan also fail with Prisma errorP2003.Steps to reproduce
Expected
All resumes belonging to the logged-in user appear in the dropdown (same set as Profile), and leaving Resume unselected saves with
resumeId = null.Actual
MIN_RESUME_SECTIONS_FOR_SELECTION(2) while Profile usesminSections = 0.resumewritesJob.resumeId = ""instead ofnull, which can trigger PrismaP2003(foreign key constraint).Suggested fix
null.Related
Not covered by existing issues (checked #76, #71, #49, #11 — different problems).