-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overriding modeladmin's get_queryset not respected by Edit-, Inspect & DeleteView #21
Comments
@gasman This is serious |
Would like to give this a try. |
@gasman @disconnect821 I'm on it |
… of InstanceSpecificView -this fixes #5727
The documentation does mention that the Changing this behaviour might be unexpected (although unlikely) for existing users. That said, I'm inclined to classify this as an enhancement request rather than a bug. As per wagtail/rfcs#85, I'm moving this to the wagtail-modeladmin repo. I believe the same is also the case with snippets, so I'll file a separate issue for that. |
It's common to use a filtered set of models in order to apply view restrictions on list views, e.g.
Issue
File wagtail/contrib/modeladmin/options.py
Example override:
If you try to change the id of an edit url (which shouldn't be allowed) you can still enter the details of that object. From my point of view it's caused by this piece of code:
Possible solution
The id/pk should be filtered from the
get_queryset
instead and respect it possible overrides.The text was updated successfully, but these errors were encountered: