From b94b798325a639a35f1ffef1051fa5c070488f01 Mon Sep 17 00:00:00 2001
From: "Douglas Cerna (Soy Douglas)" <douglascerna@yahoo.com>
Date: Tue, 21 Aug 2018 11:02:58 -0600
Subject: [PATCH] Fixed election sorting in admin elections page

---
 helios/stats_views.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/helios/stats_views.py b/helios/stats_views.py
index 7d2a62e..74c12f9 100644
--- a/helios/stats_views.py
+++ b/helios/stats_views.py
@@ -42,8 +42,7 @@ def elections(request):
   limit = int(request.GET.get('limit', 25))
   q = request.GET.get('q','')
 
-  elections = Election.objects.filter(name__icontains = q)
-  elections.all().order_by('-created_at')
+  elections = Election.objects.filter(name__icontains = q).order_by('-created_at')
   elections_paginator = Paginator(elections, limit)
   elections_page = elections_paginator.page(page)
 
-- 
GitLab