Fix has_bulk_actions

This commit is contained in:
Jeremy Stretch 2025-06-26 21:46:36 -04:00
parent 7c0fbd1703
commit 1c558805a5
2 changed files with 2 additions and 4 deletions

View File

@ -152,8 +152,7 @@ class ObjectListView(BaseMultiObjectView, ActionsMixin, TableMixin):
# Determine the available actions
actions = self.get_permitted_actions(request.user)
# has_bulk_actions = any([a.startswith('bulk_') for a in actions])
has_bulk_actions = True
has_bulk_actions = any(action.bulk for action in actions.values())
if 'export' in request.GET:

View File

@ -143,8 +143,7 @@ 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])
has_bulk_actions = True
has_bulk_actions = any(a.bulk for a in actions)
table_data = self.prep_table_data(request, child_objects, instance)
table = self.get_table(table_data, request, has_bulk_actions)