Fixes #10996: Hide checkboxes on child object lists when no bulk operations are available

This commit is contained in:
jeremystretch
2022-11-22 08:43:23 -05:00
parent 4623858849
commit dc1da0a738
2 changed files with 3 additions and 1 deletions

View File

@@ -125,9 +125,10 @@ class ObjectChildrenView(ObjectView, ActionsMixin, TableMixin):
# Determine the available actions
actions = self.get_permitted_actions(request.user, model=self.child_model)
has_bulk_actions = any([a.startswith('bulk_') for a in actions])
table_data = self.prep_table_data(request, child_objects, instance)
table = self.get_table(table_data, request, bool(actions))
table = self.get_table(table_data, request, has_bulk_actions)
# If this is an HTMX request, return only the rendered table HTML
if is_htmx(request):