From 848cd4194cfb5e187427b1c840d436c7c5b65be0 Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Mon, 30 Jun 2025 09:07:03 +0000 Subject: [PATCH] Fix reorder button appearing on all device views - Change `model` to `models` list in ReorderButton template extension - Ensures reorder button only appears on rack views as intended - Resolves issue where button was showing on all DCIM object views - Bump version to 1.1.4 Fixes #36 --- netbox_reorder_rack/__init__.py | 2 +- netbox_reorder_rack/template_content.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox_reorder_rack/__init__.py b/netbox_reorder_rack/__init__.py index be01ef2..688d575 100644 --- a/netbox_reorder_rack/__init__.py +++ b/netbox_reorder_rack/__init__.py @@ -5,7 +5,7 @@ class NetboxReorderRackConfig(PluginConfig): name = "netbox_reorder_rack" verbose_name = "NetBox Reorder Rack" description = "NetBox plugin to reorder rack layouts." - version = "1.1.3" + version = "1.1.4" base_url = "reorder" diff --git a/netbox_reorder_rack/template_content.py b/netbox_reorder_rack/template_content.py index 7ee2bc3..7684b51 100644 --- a/netbox_reorder_rack/template_content.py +++ b/netbox_reorder_rack/template_content.py @@ -2,7 +2,7 @@ class ReorderButton(PluginTemplateExtension): - model = "dcim.rack" + models = ["dcim.rack"] def buttons(self): return self.render("netbox_reorder_rack/inc/rack_button.html") diff --git a/setup.py b/setup.py index e206189..9fbd623 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="netbox_reorder_rack", - version="1.1.3", + version="1.1.4", author="Alex Gittings", author_email="agitting96@gmail.com", description="NetBox plugin to reorder rack layouts.",