浏览代码

Fix search in People snippet. Fixes #205

Paolo Dina 6 年之前
父节点
当前提交
742448dcdd
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      bakerydemo/base/models.py

+ 2 - 2
bakerydemo/base/models.py

@@ -24,7 +24,7 @@ from .blocks import BaseStreamBlock
 
 
 @register_snippet
-class People(ClusterableModel):
+class People(index.Indexed, ClusterableModel):
     """
     A Django model to store People objects.
     It uses the `@register_snippet` decorator to allow it to be accessible
@@ -56,7 +56,7 @@ class People(ClusterableModel):
         ImageChooserPanel('image')
     ]
 
-    search_fields = Page.search_fields + [
+    search_fields = [
         index.SearchField('first_name'),
         index.SearchField('last_name'),
     ]