liberation / django-elasticsearch

Simple wrapper around elasticsearch-py to index/search a django Model.
MIT License
211 stars 73 forks source link

ElasticsearchFilterBackend throws Exception #54

Open gnarula opened 8 years ago

gnarula commented 8 years ago

Traceback:

File "/home/gaurav/dev/proj/venv/lib/python2.7/site-packages/rest_framework/generics.py", line 151, in filter_queryset
    queryset = backend().filter_queryset(self.request, queryset, self)
  File "/home/gaurav/dev/proj/venv/lib/python2.7/site-packages/django_elasticsearch/contrib/restframework/restframework3.py", line 25, in filter_queryset
    if view.action == 'list':
AttributeError: 'AccountView' object has no attribute 'action'

AccountView is a ListCreateAPIView with filter_backends = (ElasticsearchFilterBackend, )