Просмотр исходного кода

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
Martin Hauser 2 дней назад
Родитель
Сommit
93e01d5b07
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/dcim/views.py

+ 1 - 1
netbox/dcim/views.py

@@ -389,7 +389,7 @@ class SiteGroupView(GetRelatedModelsMixin, generic.ObjectView):
                 title=_('Child Groups'),
                 title=_('Child Groups'),
                 filters={'parent_id': lambda ctx: ctx['object'].pk},
                 filters={'parent_id': lambda ctx: ctx['object'].pk},
                 actions=[
                 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}),
                 ],
                 ],
             ),
             ),
         ]
         ]