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

Fixes interface logging error

Jeremy Stretch пре 7 година
родитељ
комит
06143b6c70
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      netbox/dcim/models.py

+ 1 - 1
netbox/dcim/models.py

@@ -1937,7 +1937,7 @@ class Interface(ComponentModel):
             related_object=self.get_component_parent(),
             action=action,
             object_data=serialize_object(self, extra={
-                'connected_interface': self.connected_interface.pk,
+                'connected_interface': self.connected_interface.pk if self.connection else None,
                 'connection_status': self.connection.connection_status if self.connection else None,
             })
         ).save()