Просмотр исходного кода

Add missing newline and change wording of InventoryItem validation

kkthxbye-code 3 лет назад
Родитель
Сommit
a57378e780
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      netbox/dcim/models/device_components.py

+ 2 - 2
netbox/dcim/models/device_components.py

@@ -1165,8 +1165,8 @@ class InventoryItem(MPTTModel, ComponentModel):
             # Prevent moving InventoryItems with children
             first_child = self.get_children().first()
             if first_child and first_child.device != self.device:
-                raise ValidationError("Cannot move an InventoryItem with dependent children")
+                raise ValidationError("Cannot move an inventory item with dependent children")
 
             # When moving an InventoryItem to another device, remove any associated component
             if self.component and self.component.device != self.device:
-                self.component = None
+                self.component = None