Refresh exhibit labels and contents after review edits - #1114
Draft
nonprofittechy wants to merge 2 commits into
Draft
nonprofittechy wants to merge 2 commits into
nonprofittechy wants to merge 2 commits into
Conversation
… rebuilds ALExhibitList.as_pdf(refresh=True) now recalculates auto labels and page offsets before rebuilding covers, so direct list-level calls don't render stale labels after a reorder or delete. The list passes refresh_cover_page=False to each exhibit since it already refreshed every cover in its preflight pass. Also move the __main__ guard back to the end of the test module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Reviewing an ALExhibitDocument can reorder, rename, or delete exhibits after its PDF, cover pages, and table of contents have been generated. A later
as_pdf()then reuses stale cover labels or the old table of contents: for example, deleting Exhibit A can leave B/C covers beside an A/B contents page.Refresh the list labels and page offsets, the contents attachment, each cover attachment, and the rendered exhibit PDF before assembling a refreshed document. The list resolves all cover dependencies before PDF work, so docassemble's lazy attachment gathering does not interrupt a partial render.
refresh=Falsecontinues to use cached exhibit PDFs.Validation: 15 focused exhibit unit tests passed. On localhost docassemble 1.10.10 and 1.9.13 (with a targeted backport of this change), real browser runs uploaded 0, 1, and 3 synthetic PDF exhibits, then reordered, renamed, and deleted one. Final, preview, bundle, and captured email attachment PDFs all had exact membership, contents references, cover labels, and page prefixes; impounded content was absent from ordinary outputs. Email transport was intercepted in the fixture.