Fixes #5091: Avoid KeyError when handling invalid table preferences

This commit is contained in:
Jeremy Stretch 2020-09-02 13:30:19 -04:00
parent 268aa755c4
commit b559c827d2
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
* [#5085](https://github.com/netbox-community/netbox/issues/5085) - Fix ordering by assignment in IP addresses table
* [#5087](https://github.com/netbox-community/netbox/issues/5087) - Restore label field when editing console server ports, power ports, and power outlets
* [#5090](https://github.com/netbox-community/netbox/issues/5090) - Fix status display for console/power/interface connections
* [#5091](https://github.com/netbox-community/netbox/issues/5091) - Avoid KeyError when handling invalid table preferences
---

View File

@ -44,7 +44,7 @@ class BaseTable(tables.Table):
self.columns.show(name)
else:
self.columns.hide(name)
self.sequence = columns
self.sequence = [c for c in columns if c in self.base_columns]
# Always include PK and actions column, if defined on the table
if pk: