1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Hide table checkboxes when no bulk actions are enabled

This commit is contained in:
jeremystretch
2022-03-02 16:13:59 -05:00
parent dadd8cb93a
commit 21e3159711
5 changed files with 65 additions and 60 deletions

View File

@ -9,9 +9,6 @@ def get_permission_for_model(model, action):
:param model: A model or instance
:param action: View, add, change, or delete (string)
"""
if action not in ('view', 'add', 'change', 'delete'):
raise ValueError(f"Unsupported action: {action}")
return '{}.{}_{}'.format(
model._meta.app_label,
action,