mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 13:08:16 -06:00
Fixes #8787: Hide pk column if not required
This commit is contained in:
parent
21e3159711
commit
5a93cd460a
@ -70,8 +70,11 @@ class ObjectListView(BaseMultiObjectView):
|
||||
bulk_actions: Show checkboxes for object selection
|
||||
"""
|
||||
table = self.table(self.queryset, user=request.user)
|
||||
if 'pk' in table.base_columns and bulk_actions:
|
||||
if 'pk' in table.base_columns:
|
||||
if bulk_actions:
|
||||
table.columns.show('pk')
|
||||
else:
|
||||
table.columns.hide('pk')
|
||||
|
||||
return table
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user