Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions netbox/dcim/models/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,11 @@ def save(self, *args, **kwargs):
def delete(self, *args, **kwargs):

# Delete the cable association on the terminating object
termination_model = self.termination._meta.model
termination_model.objects.filter(pk=self.termination_id).update(
cable=None,
cable_end=''
)
termination = self.termination._meta.model.objects.get(pk=self.termination_id)
termination.snapshot()
termination.cable = None
termination.cable_end = ''
termination.save()

super().delete(*args, **kwargs)

Expand Down