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

Fixes #13451: Disable table ordering for custom link columns

This commit is contained in:
Jeremy Stretch
2023-08-14 08:51:16 -04:00
parent 37d6f6abca
commit b583770765
2 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,7 @@
* [#13369](https://github.com/netbox-community/netbox/issues/13369) - Fix job termination status for failed reports
* [#13414](https://github.com/netbox-community/netbox/issues/13414) - Fix support for "hide-if-unset" custom fields on bulk import forms
* [#13446](https://github.com/netbox-community/netbox/issues/13446) - Don't disable bulk edit/delete buttons after deselecting "select all" checkbox
* [#13451](https://github.com/netbox-community/netbox/issues/13451) - Disable table ordering for custom link columns
---

View File

@ -504,9 +504,9 @@ class CustomLinkColumn(tables.Column):
"""
def __init__(self, customlink, *args, **kwargs):
self.customlink = customlink
kwargs['accessor'] = Accessor('pk')
if 'verbose_name' not in kwargs:
kwargs['verbose_name'] = customlink.name
kwargs.setdefault('accessor', Accessor('pk'))
kwargs.setdefault('orderable', False)
kwargs.setdefault('verbose_name', customlink.name)
super().__init__(*args, **kwargs)