Commit 896a5948 authored by Elger Jonker's avatar Elger Jonker

organization timelines only for the last year

parent 87aa41e7
......@@ -910,8 +910,10 @@ def organization_vulnerability_timeline(request, organization_id: int, organizat
# We don't do anything with organization_type: str="", country: str="", it's just so the requests are compatible
# and easier to code.
one_year_ago = datetime.now(pytz.utc) - timedelta(days=365)
ratings = OrganizationRating.objects.all().filter(organization=organization_id).order_by('when')
ratings = OrganizationRating.objects.all().filter(organization=organization_id,
when__gte=one_year_ago).order_by('when')
stats = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment