freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
550 stars 151 forks source link

Block(?) RECAP PDF uploads with attachment_number 0 #4598

Open albertisfu opened 1 month ago

albertisfu commented 1 month ago

From #4597 have detected that we've been receiving uploads with attachment_number 0 for Main documents, which are merged into the document during the upload. This causes the RECAPDocument page to be unable to load.

I'm unsure if we should block these PDF uploads with attachment_number 0 because, from the examples I've reviewed, the documents matched the main document. We could probably allow the upload and just avoid merging 0 as an attachment_number.

We also have Main documents with attachment_number 1, which is not harmful for displaying the RECAPDocument page. However, we should confirm if this is correct. If not, we can probably also avoid merging 1 and other attachment numbers on Main Documents.