From ade0eda9e02bd030130c0018159c7f418c63e5bb Mon Sep 17 00:00:00 2001 From: yash-pal1 Date: Tue, 10 Oct 2023 19:07:51 +0530 Subject: [PATCH] error message modified --- netbox/ipam/forms/bulk_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/forms/bulk_import.py b/netbox/ipam/forms/bulk_import.py index cbc97ca49..3010debab 100644 --- a/netbox/ipam/forms/bulk_import.py +++ b/netbox/ipam/forms/bulk_import.py @@ -526,9 +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("Device needs to be assign an IPAddress") + raise forms.ValidationError(f"Device is not assigned to this {ip_address}") if virtual_machine and ip_address != virtual_machine.primary_ip4: - raise forms.ValidationError("Virtual Machine needs to be assign an IPAddress") + raise forms.ValidationError(f"Virtual Machine is not assigned to this {ip_address}") return self.cleaned_data