Browse Source

adds related object to rack reservation changelogs (#19306)

Jamie (Bear) Murphy 1 year ago
parent
commit
e8dd486132
1 changed files with 5 additions and 0 deletions
  1. 5 0
      netbox/dcim/models/racks.py

+ 5 - 0
netbox/dcim/models/racks.py

@@ -725,3 +725,8 @@ class RackReservation(PrimaryModel):
     @property
     def unit_list(self):
         return array_to_string(self.units)
+
+    def to_objectchange(self, action):
+        objectchange = super().to_objectchange(action)
+        objectchange.related_object = self.rack
+        return objectchange