Opened 13 years ago
Closed 13 years ago
#18619 closed Bug (duplicate)
make sure get_inline_instances() follows the same API convention as the other functions
| Reported by: | Stephan Jaensch | Owned by: | Stephan Jaensch | 
|---|---|---|---|
| Component: | contrib.admin | Version: | dev | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
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 by , 13 years ago
| Status: | new → assigned | 
|---|---|
| Type: | Cleanup/optimization → Bug | 
This is the pull request: https://github.com/django/django/pull/202