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

asgoel/fix inline instances #46

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

Conversation

asgoel
Copy link

@asgoel asgoel commented Jun 22, 2021

Description

I noticed a bug (I think) where the handle action function does not pass through the parent object into the get_inline_instances function. Sometimes, a ModelAdmin will display or not display an inline(s) based on some property of the object itself. So, this function was error'ing out with a unbound model_admin instance since get_inline_instances was coming up with an empty list.

Fixes #(issue)

Checklist

  • Tests covering the new functionality have been added
  • Code builds clean without any errors or warnings
  • Documentation has been updated
  • Changes have been added to the CHANGELOG.md
  • You added yourself to the CONTRIBUTORS.md

Some ModelAdmin pages depend on the object itself existing and some
properties of the object in order to display inlines. We should make
sure we pass in the proper object when fetching inline instances in
order to determine which action to use.
@asgoel
Copy link
Author

asgoel commented Jun 22, 2021

@escaped let me know if this makes sense

@asgoel
Copy link
Author

asgoel commented Jan 21, 2022

@escaped just following up on this?

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