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

Fixes #5465: Correct return URL when disconnecting a cable from a device

Jeremy Stretch 5 лет назад
Родитель
Сommit
6a3dab0142

+ 1 - 0
docs/release-notes/version-2.10.md

@@ -9,6 +9,7 @@
 * [#5458](https://github.com/netbox-community/netbox/issues/5458) - Creating a component template throws an exception
 * [#5461](https://github.com/netbox-community/netbox/issues/5461) - Rack Elevations throw reverse match exception
 * [#5463](https://github.com/netbox-community/netbox/issues/5463) - Back-to-back Circuit Termination throws AttributeError exception
+* [#5465](https://github.com/netbox-community/netbox/issues/5465) - Correct return URL when disconnecting a cable from a device
 
 ---
 

+ 1 - 1
netbox/templates/dcim/inc/cable_toggle_buttons.html

@@ -10,7 +10,7 @@
     {% endif %}
 {% endif %}
 {% if perms.dcim.delete_cable %}
-    <a href="{% url 'dcim:cable_delete' pk=cable.pk %}?return_url={{ device.get_absolute_url }}" title="Remove cable" class="btn btn-danger btn-xs">
+    <a href="{% url 'dcim:cable_delete' pk=cable.pk %}?return_url={{ object.get_absolute_url }}" title="Remove cable" class="btn btn-danger btn-xs">
             <i class="mdi mdi-ethernet-cable-off" aria-hidden="true"></i>
     </a>
 {% endif %}