From 8480909f5034d3a9187d64bfee9374edd35cf83a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 29 Apr 2020 10:17:52 -0400 Subject: [PATCH] Always include the 'actions' column, if present --- netbox/utilities/tables.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/netbox/utilities/tables.py b/netbox/utilities/tables.py index 57adb4256..d59e4b647 100644 --- a/netbox/utilities/tables.py +++ b/netbox/utilities/tables.py @@ -28,6 +28,7 @@ class BaseTable(tables.Table): # Apply custom column ordering if columns is not None: pk = self.base_columns.pop('pk', None) + actions = self.base_columns.pop('actions', None) for name, column in self.base_columns.items(): if name in columns: @@ -36,10 +37,13 @@ class BaseTable(tables.Table): self.columns.hide(name) self.sequence = columns - # Always include PK column, if defined on the table + # Always include PK and actions column, if defined on the table if pk: self.base_columns['pk'] = pk self.sequence.insert(0, 'pk') + if actions: + self.base_columns['actions'] = actions + self.sequence.append('actions') @property def configurable_columns(self):