mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Fixes #16376: Log changes on terminating objects when attaching a cable
This commit is contained in:
parent
87109f5539
commit
4242546270
@ -355,11 +355,11 @@ class CableTermination(ChangeLoggedModel):
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
# Set the cable on the terminating object
|
||||
termination_model = self.termination._meta.model
|
||||
termination_model.objects.filter(pk=self.termination_id).update(
|
||||
cable=self.cable,
|
||||
cable_end=self.cable_end
|
||||
)
|
||||
termination = self.termination._meta.model.objects.get(pk=self.termination_id)
|
||||
termination.snapshot()
|
||||
termination.cable = self.cable
|
||||
termination.cable_end = self.cable_end
|
||||
termination.save()
|
||||
|
||||
def delete(self, *args, **kwargs):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user