Skip to content

Commit 0d45ce7

Browse files
committed
Check appeals modified in the past 6 months
1 parent 25d3d38 commit 0d45ce7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/management/commands/sync_appealdocs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ def handle(self, *args, **options):
4848
print("Doing a full scan of all Appeals")
4949
qset = Appeal.objects.all()
5050
else:
51-
# By default, only check appeals for the past 6 months where Appeal Documents is 0
51+
# By default, only check appeals modified in the past 6 months where Appeal Documents is 0
5252
now = datetime.now().replace(tzinfo=timezone.utc)
5353
six_months_ago = now - relativedelta(months=6)
5454
# This was the original qset, but it wouldn't get newer docs for the same Appeals
5555
# qset = Appeal.objects.filter(appealdocument__isnull=True).filter(end_date__gt=six_months_ago)
56-
qset = Appeal.objects.filter(end_date__gt=six_months_ago)
56+
qset = Appeal.objects.filter(modified_at__gt=six_months_ago)
5757

5858
# qset = Appeal.objects.filter(code='Something') # could help debug
5959
# First get all Appeal Codes

0 commit comments

Comments
 (0)