Skip to content

Refresh issued bonafide certificates after the salutation change - #1977

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-certificate-caps-followup
Sep 2, 2026
Merged

Refresh issued bonafide certificates after the salutation change#1977
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-certificate-caps-followup

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Follow-up to #1976. Capitalising the salutation only affected certificates generated from then on: an issued certificate keeps a copy of its PDF in pdf_content, and _certificate_pdf() returns those bytes verbatim, so the ones already generated would have kept Mr. / Ms. for ever.

This clears the cached copies, so the next download re-renders them from the current code. Reference number and issue date come from the certificate row, so they are preserved.

The caveat, stated plainly: re-rendering rebuilds the body from the student's current record, so a certificate issued long enough ago that the student has since moved year or semester would come back showing the newer details. That is not a problem today — the feature is days old, the three certificates in existence were issued between 27 August and 2 September, and each student's year and semester still match what their certificate shows. It is not a step to repeat casually later.

Verified after applying the migration: no certificate still holds a cached PDF, and re-rendering each one gives an uppercase salutation throughout, with no mixed-case Mr. or Ms. remaining.

Certificate Salutations on re-render
male student, education loan MR. x3
female student, scholarship MS. x2 + MR. x1 (father)
male student, scholarship MR. x3

manage.py check clean, no model changes detected.

Issued certificates keep a copy of their PDF and it is served back
verbatim, so the ones generated before the salutation was capitalised
would have kept the old wording for ever. The cached copies are cleared
so the next download re-renders them.

That is safe while the feature is days old and no student's year or
semester has moved since issue; it is not a step to repeat once
certificates are old enough that re-rendering would show details other
than those of the day they were issued.
@vikrantwiz02
vikrantwiz02 merged commit caa4a0c into FusionIIIT:prod/acad-react Sep 2, 2026
1 check passed
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.

1 participant