Skip to content
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

Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances and misuse #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ppython
Copy link
Contributor

@ppython ppython commented Jan 5, 2017

Maybe a noob problem, but I got an empty list when doing:

class ExampleAdmin(NestedModelAdmin, SpecificAdmin1, SpecificAdmin2):
    def get_inline_instances(self, request, obj=None):
        inlines_inst = super(
            ExampleAdmin, self).get_inline_instances(request, obj)

Instead of getting an Inline from SpecificAdmin2...

With this patch, the MRO resolution of get_inline_instances is different and I finally get my Inline from SpecificAdmin2!

Is is something desirable for all cases?

@ppython ppython changed the title Added a super call for admin.NestedModelAdmin.get_inline_instances Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances Feb 1, 2017
@ppython ppython changed the title Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances and misuse Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant