Explorar o código

fix(dcim): Correct URL parameter for Device filter in Location view (#23488)

Updates the Device filter URL parameter from 'parent' to 'location' to
match the current field name in the Device model.

Fixes #23484
Martin Hauser hai 2 días
pai
achega
237bff51de
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/dcim/views.py

+ 1 - 1
netbox/dcim/views.py

@@ -729,7 +729,7 @@ class LocationView(GetRelatedModelsMixin, generic.ObjectView):
                         'dcim.Device',
                         'dcim.Device',
                         url_params={
                         url_params={
                             'site': lambda ctx: ctx['object'].site_id,
                             'site': lambda ctx: ctx['object'].site_id,
-                            'parent': lambda ctx: ctx['object'].pk,
+                            'location': lambda ctx: ctx['object'].pk,
                         }
                         }
                     ),
                     ),
                 ],
                 ],