Skip to content

Commit

Permalink
Altered the reindex command to handle inherited models. Thanks smulloni!
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Apr 28, 2009
1 parent 0f22499 commit cbcab68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/management/commands/reindex.py
Expand Up @@ -63,7 +63,7 @@ def handle_app(self, app, **options):

# DRL_TODO: .select_related() seems like a good idea here but
# can cause empty QuerySets. Why?
qs = index.get_query_set().filter(**extra_lookup_kwargs).order_by(model._meta.pk.attname)
qs = index.get_query_set().filter(**extra_lookup_kwargs).order_by(model._meta.pk.name)
total = qs.count()

if self.verbosity >= 1:
Expand Down

0 comments on commit cbcab68

Please sign in to comment.