euscanwww: datetime is not indexed, id is

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary 2011-07-21 15:01:14 +02:00
parent 91e928371d
commit 421dbefdcf

View File

@ -21,7 +21,7 @@ def index(request):
ctx['n_packages'] = Package.objects.count()
ctx['n_herds'] = Herd.objects.count()
ctx['n_maintainers'] = Maintainer.objects.count()
ctx['last_scan'] = EuscanResult.objects.aggregate(Max('datetime'))['datetime__max']
ctx['last_scan'] = EuscanResult.objects.get(id=EuscanResult.objects.aggregate(Max('id'))['id__max']).datetime
return ctx
@render_to('euscan/logs.html')