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
If you are inheriting from MongoEngine's QuerySetNoCache() instead of QuerySet() for a custom QuerySet, the you will get the following error:
File \"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tastypie/resources.py\", line 1930, in build_filters
query_terms = self._meta.queryset.query.query_terms
AttributeError: 'CustomQuerySet' object has no attribute 'query'
If you lift the code from lines 32-41 of resources.py and add it to your custom QuerySet class, things will work. Seems like that code is very specific to using the cached QuerySet and not supporting the non-cached version?
The text was updated successfully, but these errors were encountered:
This is code from Tastypie. We extend the code which assumes that it uses Django ORM, and then we override things for MongoEngine.
It would be helpful if you provide whole stack. Because then we could see where from this code is called and if it goes somewhere through our code. Maybe in some other case we already have a workaround, which checks for example for class instance and is not patching here the queryset.
The best would be if you could make a pull request with the test which is failing for you.
If you are inheriting from MongoEngine's QuerySetNoCache() instead of QuerySet() for a custom QuerySet, the you will get the following error:
If you lift the code from lines 32-41 of resources.py and add it to your custom QuerySet class, things will work. Seems like that code is very specific to using the cached QuerySet and not supporting the non-cached version?
The text was updated successfully, but these errors were encountered: