From f5d064fface15f8655ab5dac8de620bc9c6edb43 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 8 Apr 2013 21:42:53 +0100 Subject: [PATCH] Ignore stores without a geo location from the search index. --- app/stores/search_indexes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/stores/search_indexes.py b/app/stores/search_indexes.py index 9732c7c..82dae2d 100644 --- a/app/stores/search_indexes.py +++ b/app/stores/search_indexes.py @@ -12,4 +12,4 @@ class StoreIndex(indexes.SearchIndex, indexes.Indexable): def index_queryset(self, using=None): """Used when the entire index for model is updated.""" - return self.get_model().objects.filter(active=True) + return self.get_model().objects.filter(active=True).exclude(geo_latitude=None)