From cbcab68110af17bfcebcfffdeb49b610cc414577 Mon Sep 17 00:00:00 2001 From: Daniel Lindsley Date: Mon, 27 Apr 2009 22:50:49 -0500 Subject: [PATCH] Altered the reindex command to handle inherited models. Thanks smulloni! --- haystack/management/commands/reindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/management/commands/reindex.py b/haystack/management/commands/reindex.py index a5e555f7f..b32b54f06 100755 --- a/haystack/management/commands/reindex.py +++ b/haystack/management/commands/reindex.py @@ -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: