Refresh issued bonafide certificates after the salutation change - #1977
Merged
vikrantwiz02 merged 1 commit intoSep 2, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 keptMr./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.orMs.remaining.MR.x3MS.x2 +MR.x1 (father)MR.x3manage.py checkclean, no model changes detected.