mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-24 04:22:41 -06:00
Fixes #19818: Hide IP fields when creating VM
This commit is contained in:
@@ -280,10 +280,8 @@ class VirtualMachineForm(TenancyForm, NetBoxModelForm):
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
# An object that doesn't exist yet can't have any IPs assigned to it
|
# An object that doesn't exist yet can't have any IPs assigned to it
|
||||||
self.fields['primary_ip4'].choices = []
|
self.fields.pop('primary_ip4')
|
||||||
self.fields['primary_ip4'].widget.attrs['readonly'] = True
|
self.fields.pop('primary_ip6')
|
||||||
self.fields['primary_ip6'].choices = []
|
|
||||||
self.fields['primary_ip6'].widget.attrs['readonly'] = True
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user