make sure get_inline_instances() follows the same API convention as the other functions
|Reported by:||sjaensch||Owned by:||sjaensch|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When developing the patch for ticket #8060, I missed the fact that the BaseModelAdmin / ModelAdmin API in django.contrib.admin.options passes an instance object where applicable, paving the way for implementations of object-level permissions. Therefore, the newly created method get_inline_instances should accept an instance parameter and pass it along accordingly.
Similar ModelAdmin methods that already support the instance parameter are get_fieldsets(), get_readonly_fields(), get_prepopulated_fields() or get_formsets().
I'll post the link to the pull request as a comment. The patch passes the Django test suite.
Change History (2)
comment:1 Changed 3 years ago by sjaensch
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Status changed from new to assigned
- Type changed from Cleanup/optimization to Bug