fixed installation ordering issue with field methods
This commit is contained in:
@@ -96,7 +96,6 @@ Steps
|
||||
|
||||
$ git clone https://github.com/netbox-community/netbox
|
||||
$ cd netbox
|
||||
$ git checkout f5356b8 (to pin 3.0.9)
|
||||
|
||||
install the virtual environment
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class SLMConfig(PluginConfig):
|
||||
name = 'netbox_slm'
|
||||
verbose_name = 'Software Lifecycle Management'
|
||||
description = 'Software Lifecycle Management'
|
||||
version = '0.95'
|
||||
version = '0.96'
|
||||
author = 'Hedde van der Heide'
|
||||
author_email = 'hedde.vanderheide@ictu.nl'
|
||||
base_url = 'slm'
|
||||
|
||||
@@ -142,5 +142,13 @@ class SoftwareProductInstallationTable(NetBoxTable):
|
||||
"tags",
|
||||
)
|
||||
|
||||
def order_platform(self, queryset, is_descending):
|
||||
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||
return queryset, True
|
||||
|
||||
def order_type(self, queryset, is_descending):
|
||||
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||
return queryset, True
|
||||
|
||||
def render_software_product(self, value, **kwargs):
|
||||
return f"{kwargs['record'].software_product.manufacturer.name} - {value}"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = netbox-slm
|
||||
version = 0.95
|
||||
version = 0.96
|
||||
description = Software Lifecycle Management Netbox Plugin.
|
||||
# long_description = file: README.rst
|
||||
# long_description_content_type='text/x-rst'
|
||||
|
||||
Reference in New Issue
Block a user