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