Skip to content

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

asgoel added 2 commits June 21, 2021 18:53
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