Skip to content

SE-3079 bugfix: conditional instance ref inline admin

Ghost User requested to merge samuel/fix-inline-conditional into master

The get_inline_instances method should return a list of admin classes to inline.

Previously, it was modifying self.inlines, which is a static class variable, causing weird behaviour. Sometimes, the inline admin was not included for existing instances.

Test instructions:

  • visit /admin/instance/openedxinstance/
  • click 'add open edx instance'
  • verify that the instance reference inline form is not included at the bottom of the page
  • find an existing instance and edit it
  • verify that the instance reference inline form is included at the bottom of the page

Reviewers:

Merge request reports