Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Main documents with attachment number 0 #4599

Open
albertisfu opened this issue Oct 19, 2024 · 0 comments
Open

Clean up Main documents with attachment number 0 #4599

albertisfu opened this issue Oct 19, 2024 · 0 comments

Comments

@albertisfu
Copy link
Contributor

Once we stop merging documents with attachment 0, we should clean up Main documents with attachment_number 0 and set it to None.

For this, we can use the following query as a base:

RECAPDocument.objects.filter(
    document_type=RECAPDocument.PACER_DOCUMENT,
    document_number__isnull=False,
    attachment_number=0
)

We also have Main documents with attachment_number 1 (and probably other numbers), which we can review to determine if they need to be cleaned up as well.

RECAPDocument.objects.filter(
    document_type=RECAPDocument.PACER_DOCUMENT,
    document_number__isnull=False,
    attachment_number=1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant