]> git.0d.be Git - panikweb.git/commitdiff
update more like this search for django 1.8
authorFrédéric Péters <fpeters@0d.be>
Tue, 18 Apr 2017 13:16:15 +0000 (15:16 +0200)
committerFrédéric Péters <fpeters@0d.be>
Tue, 18 Apr 2017 13:16:15 +0000 (15:16 +0200)
panikweb/search.py

index a41167227fb20dce5d9a2f2bde22458528b2b3bf..10091bc62f66ef246a71f57405cec3f7b255df82 100644 (file)
@@ -76,7 +76,7 @@ class CustomSolrSearchBackend(haystack.backends.solr_backend.SolrSearchBackend):
             limit_to_registered_models = getattr(settings, 'HAYSTACK_LIMIT_TO_REGISTERED_MODELS', True)
 
         if models and len(models):
             limit_to_registered_models = getattr(settings, 'HAYSTACK_LIMIT_TO_REGISTERED_MODELS', True)
 
         if models and len(models):
-            model_choices = sorted(['%s.%s' % (model._meta.app_label, model._meta.module_name) for model in models])
+            model_choices = sorted(['%s.%s' % (model._meta.app_label, model._meta.model_name) for model in models])
         elif limit_to_registered_models:
             # Using narrow queries, limit the results to only models handled
             # with the current routers.
         elif limit_to_registered_models:
             # Using narrow queries, limit the results to only models handled
             # with the current routers.