Преглед изворни кода

adds related object to rack reservation changelogs (#19306)

Jamie (Bear) Murphy пре 10 месеци
родитељ
комит
e8dd486132
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      netbox/dcim/models/racks.py

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

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