1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merged v2.5.13

This commit is contained in:
Jeremy Stretch
2019-05-31 21:37:41 -04:00
40 changed files with 801 additions and 769 deletions

View File

@@ -274,11 +274,16 @@ class CircuitTermination(CableTermination):
"""
Reference the parent circuit when recording the change.
"""
try:
related_object = self.circuit
except Circuit.DoesNotExist:
# Parent circuit has been deleted
related_object = None
ObjectChange(
user=user,
request_id=request_id,
changed_object=self,
related_object=self.circuit,
related_object=related_object,
action=action,
object_data=serialize_object(self)
).save()