Fix "create failed" bug in add DHCP agent form
When Add DHCP agent for a network that it's name is blank, it cast error "This field is required" beside the network name field. So there should display the network's name_or_id in "Add DHCP Agent" form modal, and this is consistent with the "Edit Network". This patch fix the bug. Change-Id: I4ad4b1d9907d7aa521ba6da44be8230aa301fcb2 Closes-Bug: #1495105
This commit is contained in:
parent
876e276027
commit
88674d0f3d
@ -54,7 +54,7 @@ class AddView(forms.ModalFormView):
|
||||
try:
|
||||
network = api.neutron.network_get(self.request, network_id)
|
||||
initial.update({"network_id": network_id,
|
||||
"network_name": network.name,
|
||||
"network_name": network.name_or_id,
|
||||
"agents": agents})
|
||||
return initial
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user