Opened 3 years ago

Closed 3 years ago

#18619 closed Bug (duplicate)

make sure get_inline_instances() follows the same API convention as the other functions

Reported by: sjaensch Owned by: sjaensch
Component: contrib.admin Version: master
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


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

comment:2 Changed 3 years ago by aaugustin

  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #17856.

Note: See TracTickets for help on using tickets.
Back to Top