You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i am on Debian 10 buster, python 3.7
I installed django-shop 1.2.4 demo and it works quite well.
however a bug related to the elasticsearch_dsl library occurs when I use the site search module:
TypeError at /en/search/
Unexpected queryset model (should be: <class 'myshop.models.Product'>, got: <class 'myshop.models.Product'>)
Request Method: GET
Request URL: http://www.cris-shiatsu.fr:9009/en/search/?q=test
Django Version: 3.0.14
Exception Tyoe: TypeError
Exception Value: Unexpected queryset model (should be: <class 'myshop.models.Product'>, got: <class 'myshop.models.Product'>)
Exception Location: /usr/local/lib/python3.7/site-packages/django_elasticsearch_dsl/search.py in filter_queryset, line 26
/usr/local/bin/uwsgi
Python version: 3.7.17
This bug refers to the following code in search.py of the django-elasticsearch-dsl library:
deffilter_queryset(self, queryset, keep_search_order=True):
""" Filter an existing django queryset using the elasticsearch result. It costs a query to the sql db. """s=selfifs._modelisnotqueryset.model:
raiseTypeError(
'Unexpected queryset model ''(should be: %s, got: %s)'% (s._model, queryset.model)
)
For the moment I commented out the error throwing condition and it works but i would like to understand and eventually resolve the problem without hacking the library
Please would you have an idea ?
The text was updated successfully, but these errors were encountered:
Hi,
i am on Debian 10 buster, python 3.7
I installed django-shop 1.2.4 demo and it works quite well.
however a bug related to the elasticsearch_dsl library occurs when I use the site search module:
TypeError at /en/search/
Unexpected queryset model (should be: <class 'myshop.models.Product'>, got: <class 'myshop.models.Product'>)
Request Method: GET
Request URL: http://www.cris-shiatsu.fr:9009/en/search/?q=test
Django Version: 3.0.14
Exception Tyoe: TypeError
Exception Value: Unexpected queryset model (should be: <class 'myshop.models.Product'>, got: <class 'myshop.models.Product'>)
Exception Location: /usr/local/lib/python3.7/site-packages/django_elasticsearch_dsl/search.py in filter_queryset, line 26
/usr/local/bin/uwsgi
Python version: 3.7.17
This bug refers to the following code in search.py of the django-elasticsearch-dsl library:
For the moment I commented out the error throwing condition and it works but i would like to understand and eventually resolve the problem without hacking the library
Please would you have an idea ?
The text was updated successfully, but these errors were encountered: