From a57378e780910b6aa30a900cdd9f7f80e7599ba6 Mon Sep 17 00:00:00 2001 From: kkthxbye-code Date: Sun, 11 Dec 2022 14:00:21 +0100 Subject: [PATCH] Add missing newline and change wording of InventoryItem validation --- netbox/dcim/models/device_components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/models/device_components.py b/netbox/dcim/models/device_components.py index b425d8dbd..dc1ae6e35 100644 --- a/netbox/dcim/models/device_components.py +++ b/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 \ No newline at end of file + self.component = None