feat: support netbox-export 0.3.14 and netbox-reorder-rack 1.1.5

Verified against the actually installed versions that the patched
hook signatures (serialize_object, is_exportable_model,
_defer_device_placement, _device_placement_conflicts,
_apply_device_placements, SaveViewSet.update, ReorderView.get) are
still compatible with our wrappers, then added both versions to the
supported sets so the width-aware patches stop being silently
skipped.

netbox-reorder-rack 1.1.5 changed ReorderView.get from
(self, request, pk) to (self, request, **kwargs). Our fallback path
called the original view with a positional pk, which would now raise
TypeError; width_aware_reorder_get now accepts pk as a keyword with
**kwargs passthrough so both the patched and native code paths work
regardless of which signature is installed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 15:27:34 +02:00
co-authored by Claude Sonnet 5
parent ead171d546
commit 20ec9453c2
5 changed files with 31 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ from .rack_width import (
logger = logging.getLogger(__name__)
SUPPORTED_NETBOX_EXPORT_VERSIONS = {"0.3.11"}
SUPPORTED_NETBOX_EXPORT_VERSIONS = {"0.3.11", "0.3.14"}
RACK_WIDTH_RECORD_KEY = "netbox_utilities_rack_placement"
PATCH_MARKER = "_netbox_utilities_rack_width_version"
PATCH_VERSION = 1