Skip to content

Commit

Permalink
brute force hiding all citations from the October 28 2024 surprise wh…
Browse files Browse the repository at this point in the history
…ere SCOTUS touched hundreds of old citations and triggered thousands of repeat citation ingests, which I don't have time to review. more in code comment
  • Loading branch information
arderyp committed Nov 1, 2024
1 parent 2814a18 commit ba74646
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion citations/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.http import HttpResponseRedirect
from django.utils import timezone
from django.contrib import messages
Expand All @@ -13,8 +14,23 @@
def index(request):
template = 'citations.html'

## On October 28 2024, SCOTUS touched hundreds of old opinions, triggering thousdands of "new" citation
## ingests. I no longer have time to maintain this strictly. It's hihgly unlikely they were changing
## citation data. As such, the best bet for now is to simply hide these citations, because I can't verify
## them all. If this happens again, we should add a new "ignore" field to opinions, and batch ignore
## citations for flagged opinions. Yes, this is brute force and inelligant, but I simply don't have the time.

## Show all citations
# citations = Citation.objects.all().order_by('-opinion__id')

## Show only citations from opinions discovered on problem date
# citations = Citation.objects.filter(opinion_id__discovered__range=["2024-10-28", "2024-10-29"]).order_by('-opinion__id')

## Show all citations EXCEPT those published on problem date when thousand of old files were touched
citations = Citation.objects.filter(~Q(opinion_id__discovered__range=["2024-10-28", "2024-10-29"])).order_by('-opinion__id')

context = {
'citations': Citation.objects.all().order_by('-opinion__id'),
'citations': citations,
'statuses': dict(Citation.STATUSES),
}

Expand Down

0 comments on commit ba74646

Please sign in to comment.