Permalink
Browse files

Merge branch 'release/0.5.3'

  • Loading branch information...
2 parents 4530842 + 885c085 commit 78c2405509e4b16d416bbdc474edec56acc5dabe @beniwohli committed May 15, 2012
Showing with 8 additions and 5 deletions.
  1. +1 −1 cms_search/__init__.py
  2. +5 −2 cms_search/search_indexes.py
  3. +2 −2 docs/conf.py
View
@@ -1 +1 @@
-__version__ = '0.5.2'
+__version__ = '0.5.3'
@@ -5,6 +5,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_unicode
from django.utils.translation import get_language, activate
+from django.db.models import Q
try:
from django.test.client import RequestFactory
@@ -85,10 +86,12 @@ def prepare(self, obj):
def index_queryset(self):
# get the correct language and exclude pages that have a redirect
- qs = super(_PageIndex, self).index_queryset().published().filter(
- title_set__language=language_code, title_set__redirect__isnull=True).distinct()
+ qs = super(_PageIndex, self).index_queryset()
+ qs = qs.published().filter(
+ Q(title_set__language=language_code) & (Q(title_set__redirect__exact='') | Q(title_set__redirect__isnull=True)))
if 'publisher' in settings.INSTALLED_APPS:
qs = qs.filter(publisher_is_draft=True)
+ qs = qs.distinct()
return qs
return _PageIndex
View
@@ -46,9 +46,9 @@
# built documents.
#
# The short X.Y version.
-version = '0.5.2'
+version = '0.5.3'
# The full version, including alpha/beta/rc tags.
-release = '0.5.2'
+release = '0.5.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

0 comments on commit 78c2405

Please sign in to comment.