error message modified

This commit is contained in:
yash-pal1 2023-10-10 19:03:34 +05:30
parent 995586458a
commit fc616301e9

View File

@ -526,11 +526,9 @@ class ServiceImportForm(NetBoxModelImportForm):
for ip_address in self.cleaned_data.get('ipaddresses'): for ip_address in self.cleaned_data.get('ipaddresses'):
if device and ip_address != device.primary_ip4: if device and ip_address != device.primary_ip4:
raise forms.ValidationError( raise forms.ValidationError("Device needs to be assign an IPAddress")
f"IP address assignment required for the device.")
if virtual_machine and ip_address != virtual_machine.primary_ip4: if virtual_machine and ip_address != virtual_machine.primary_ip4:
raise forms.ValidationError( raise forms.ValidationError("Virtual Machine needs to be assign an IPAddress")
f"IP address assignment required for the virtual machine.")
return self.cleaned_data return self.cleaned_data