diff --git a/docs/release-notes/version-2.6.md b/docs/release-notes/version-2.6.md index 88cd9c120..c4d8f1414 100644 --- a/docs/release-notes/version-2.6.md +++ b/docs/release-notes/version-2.6.md @@ -28,6 +28,7 @@ * [#3872](https://github.com/netbox-community/netbox/issues/3872) - Paginate related IPs of an address * [#3876](https://github.com/netbox-community/netbox/issues/3876) - Fixed min/max to ASN input field at the site creation page * [#3882](https://github.com/netbox-community/netbox/issues/3882) - Fix filtering of devices by rack group +* [#3898](https://github.com/netbox-community/netbox/issues/3898) - Fix deleted message being set to None for cable --- diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 69c3c3475..89ff8bc15 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -3040,6 +3040,11 @@ class Cable(ChangeLoggedModel): def get_absolute_url(self): return reverse('dcim:cable', args=[self.pk]) + def delete(self, *args, **kwargs): + # Trigger the __str__ method to save the pk into `self.id_string` + str(self) + super().delete(*args, **kwargs) + def clean(self): # Validate that termination A exists