From fc616301e9b4c4b6ff8dacb3af18053af4a09609 Mon Sep 17 00:00:00 2001 From: yash-pal1 Date: Tue, 10 Oct 2023 19:03:34 +0530 Subject: [PATCH] error message modified --- netbox/ipam/forms/bulk_import.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/netbox/ipam/forms/bulk_import.py b/netbox/ipam/forms/bulk_import.py index 449053e1b..cbc97ca49 100644 --- a/netbox/ipam/forms/bulk_import.py +++ b/netbox/ipam/forms/bulk_import.py @@ -526,11 +526,9 @@ class ServiceImportForm(NetBoxModelImportForm): for ip_address in self.cleaned_data.get('ipaddresses'): if device and ip_address != device.primary_ip4: - raise forms.ValidationError( - f"IP address assignment required for the device.") + raise forms.ValidationError("Device needs to be assign an IPAddress") if virtual_machine and ip_address != virtual_machine.primary_ip4: - raise forms.ValidationError( - f"IP address assignment required for the virtual machine.") + raise forms.ValidationError("Virtual Machine needs to be assign an IPAddress") return self.cleaned_data