Skip to content

Commit

Permalink
Merge pull request #746 from lazerscience/fix-update-index-output
Browse files Browse the repository at this point in the history
Using force_text for indexing message
  • Loading branch information
bigjust committed Mar 26, 2013
2 parents 8e86909 + 059b543 commit 0e8bd20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haystack/management/commands/update_index.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import LabelCommand from django.core.management.base import LabelCommand
from django.db import reset_queries from django.db import reset_queries
from django.utils.encoding import smart_str from django.utils.encoding import smart_str, force_unicode


from haystack import connections as haystack_connections from haystack import connections as haystack_connections
from haystack.query import SearchQuerySet from haystack.query import SearchQuerySet
Expand Down Expand Up @@ -241,7 +241,7 @@ def update_backend(self, label, using):
total = qs.count() total = qs.count()


if self.verbosity >= 1: if self.verbosity >= 1:
print "Indexing %d %s." % (total, smart_str(model._meta.verbose_name_plural)) print "Indexing %d %s." % (total, force_unicode(model._meta.verbose_name_plural))


pks_seen = set([smart_str(pk) for pk in qs.values_list('pk', flat=True)]) pks_seen = set([smart_str(pk) for pk in qs.values_list('pk', flat=True)])
batch_size = self.batchsize or backend.batch_size batch_size = self.batchsize or backend.batch_size
Expand Down

0 comments on commit 0e8bd20

Please sign in to comment.