Modify the prompt of update network

The name is not required, so data["name"] may be empty,
but the network.name_or_id must have a value

Change-Id: Iec8d204b7211e9f5c58dbf886dadccfa824c9262
This commit is contained in:
pengyuesheng 2018-12-11 14:57:04 +08:00
parent 31116873f0
commit 6e31767a23

View File

@ -57,7 +57,8 @@ class UpdateNetwork(forms.SelfHandlingForm):
network = api.neutron.network_update(request,
self.initial['network_id'],
**params)
msg = _('Network %s was successfully updated.') % data['name']
msg = (_('Network %s was successfully updated.') %
network.name_or_id)
messages.success(request, msg)
return network
except Exception as e: