From 61fece80e1c153dd7569011cb247b066095753ee Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sun, 12 Mar 2017 21:03:07 +0000 Subject: [PATCH] Populate device_id/owner fields in Admin Edit Port form The initial values are not filled with the current value. As a result, when submitting a form, these fields will be cleared. Change-Id: Ie7eb288c381681a422aa5ae4edfb8acf645f701a Closes-Bug: #1672215 --- openstack_dashboard/dashboards/admin/networks/ports/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstack_dashboard/dashboards/admin/networks/ports/views.py b/openstack_dashboard/dashboards/admin/networks/ports/views.py index ffeda97fbd..b5c3c7c15a 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/views.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/views.py @@ -110,4 +110,6 @@ class UpdateView(project_views.UpdateView): initial = super(UpdateView, self).get_initial() port = self._get_object() initial['binding__host_id'] = port['binding__host_id'] + initial['device_id'] = port['device_id'] + initial['device_owner'] = port['device_owner'] return initial