forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #1105
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
analyze_single_patentconstructspatents/{patent_id}.pdfand reads it directly, but does not download the PDF first. Calling this method without pre-downloading the file raises aFileNotFoundErrorsilently or crashes.What to do
patents/{patent_id}.pdfexists before attempting to read it.FileNotFoundErrorpropagate.Acceptance criteria
analyze_single_patentfor a patent whose PDF is not yet cached triggers a download.Roadmap reference: P2 - Backend - analyze_single_patent missing download step
This issue has been verified as already implemented in the current codebase. The acceptance criteria are met based on code review. Closing as completed.