django-jet
django-jet copied to clipboard
JET_CHANGE_FORM_SIBLING_LINKS not filtering the queryset based on preserved_filters
Guys,
I've found that the sibling navigation is currently ignoring preserved_filters when the _changelist_filters are present in the request.GET QueryDict.
apparently the try/except block at line 219 of jet/utils.py always raises a IncorrectLookupParameters exception saying IncorrectLookupParameters: MODEL has no field named u'_changelist_filters.
I managed to "solve" this issue with a workaround by monkey patching get_model_queryset and mutating the request.GET QueryDict before reaching the exception as follows:
if not request.GET._mutable:
request.GET._mutable = True
request.GET = QueryDict(changelist_filters)
I know, probably not the best approach :/ But at least the thing is working for now.
It would be nice if you could take a look into this!
By the way, i'm using Django Jet version 1.0.6 / Django 1.9.7 / Python 2.7.2
Thanks Sandro Salles
This problem has not yet been solved.
Thanks Sandro!