Ver Fonte

adds related object to rack reservation changelogs (#19306)

Jamie (Bear) Murphy há 1 ano atrás
pai
commit
e8dd486132
1 ficheiros alterados com 5 adições e 0 exclusões
  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