From 0b507eb2074a414a63f3937888abdbecc7d4bebc Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Wed, 28 Jan 2026 19:24:53 +0100 Subject: [PATCH] fix(ipam): Include scope params in Prefix creation links Update prefix creation URLs to pass `scope_type` and `scope` (replacing the legacy `site` query parameter) for both the Child Prefixes "Add Prefix" button and in-table available-prefix links. Scope parameters are only rendered when a scope is defined, so unscoped prefixes remain unchanged. Fixes #21262 --- netbox/ipam/tables/template_code.py | 2 +- netbox/templates/ipam/prefix/prefixes.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/tables/template_code.py b/netbox/ipam/tables/template_code.py index 14b73b28d..250873c38 100644 --- a/netbox/ipam/tables/template_code.py +++ b/netbox/ipam/tables/template_code.py @@ -6,7 +6,7 @@ PREFIX_LINK = """ {% if record.pk %} {{ record.prefix }} {% else %} - {{ record.prefix }} + {{ record.prefix }} {% endif %} """ diff --git a/netbox/templates/ipam/prefix/prefixes.html b/netbox/templates/ipam/prefix/prefixes.html index 4261c3c36..cf3891bf9 100644 --- a/netbox/templates/ipam/prefix/prefixes.html +++ b/netbox/templates/ipam/prefix/prefixes.html @@ -6,7 +6,7 @@ {% include 'ipam/inc/max_depth.html' %} {% include 'ipam/inc/max_length.html' %} {% if perms.ipam.add_prefix and first_available_prefix %} - + {% trans "Add Prefix" %} {% endif %}