From 93e01d5b078d08ee85aaff1fc9b12d7bb7385a00 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Thu, 5 Mar 2026 15:37:08 +0100 Subject: [PATCH] fix(dcim): Correct object type for child Site Group actions Replace `dcim.Region` with `dcim.SiteGroup` in child Site Group actions for the DCIM view. Ensures the correct model is referenced when adding child Site Groups, improving functionality and aligning with the expected behavior. Fixes #21586 --- netbox/dcim/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index a2b0b6f31..6d7e0e99e 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -389,7 +389,7 @@ class SiteGroupView(GetRelatedModelsMixin, generic.ObjectView): title=_('Child Groups'), filters={'parent_id': lambda ctx: ctx['object'].pk}, actions=[ - actions.AddObject('dcim.Region', url_params={'parent': lambda ctx: ctx['object'].pk}), + actions.AddObject('dcim.SiteGroup', url_params={'parent': lambda ctx: ctx['object'].pk}), ], ), ]