mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 16:06:43 -06:00
error message modified
This commit is contained in:
parent
518ee85d9e
commit
995586458a
@ -526,9 +526,11 @@ 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("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:
|
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
|
return self.cleaned_data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user