From 3b85e7300d2de1e34c6f11099c29e990cdc8a64d Mon Sep 17 00:00:00 2001
From: Hovhannes Dabaghyan <hovhannes.dabaghyan@gmail.com>
Date: Tue, 11 Dec 2018 16:07:24 +0400
Subject: [PATCH] Use count query instead of retrieving list and counting list
 length.

---
 opentech/apply/funds/templates/funds/submissions_search.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opentech/apply/funds/templates/funds/submissions_search.html b/opentech/apply/funds/templates/funds/submissions_search.html
index 50b2e33b6..e2c6d176e 100644
--- a/opentech/apply/funds/templates/funds/submissions_search.html
+++ b/opentech/apply/funds/templates/funds/submissions_search.html
@@ -4,7 +4,7 @@
     <div class="wrapper wrapper--medium">
         <h3>Search Results</h3>
         {% if search_term %}
-            <h5>There are {{ object_list|length }} results for: {{ search_term }}</h5>
+            <h5>There are {{ object_list.count }} results for: {{ search_term }}</h5>
         {% endif %}
     </div>
 {% endblock %}
-- 
GitLab