mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #3898: Call str of cable on delete to save PK in id_string
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user