mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
error message modified
This commit is contained in:
parent
995586458a
commit
fc616301e9
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user