Skip to content

fix: stop deleting the signed contract when it is downloaded - #38

Merged
codcreater1 merged 18 commits into
mainfrom
fix/keep-signed-contract-after-download
Jul 16, 2026
Merged

codcreater1 merged 18 commits into
mainfrom
fix/keep-signed-contract-after-download

Conversation

@codcreater1

Copy link
Copy Markdown
Owner

/pdf/download scheduled remove_task() as a background task, wiping the task directory the first time the file was fetched. The dashboard opens that link automatically right after signing, so every signed internship agreement was destroyed on first download - contract preview 404d and emailing failed with Signed contract file is missing. This came from the one-shot PDF-signing origins of the service; here the agreement is a lasting record that is previewed, re-downloaded and emailed. Cleanup on failed upload is unaffected. Adds a regression test (verified it fails if the deletion is reintroduced).

/pdf/download scheduled remove_task() as a background task, wiping the whole
task directory the first time the file was fetched. The dashboard opens that
link automatically right after signing, so every signed internship agreement
was destroyed on first download: the contract preview 404'd and emailing it
failed with 'Signed contract file is missing'.

This delete-after-download came from the service's one-shot PDF-signing
origins; here the agreement is a lasting record that is previewed,
re-downloaded and emailed. The cleanup on *failed upload* is unaffected.

Adds a regression test that downloads twice (verified: it fails if the
deletion is reintroduced).
@codcreater1
codcreater1 merged commit 41c2069 into main Jul 16, 2026
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