Reviewed: https://review.openstack.org/86086 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=301569b81d46e7896f78296a5775f69cf7f8935f Submitter: Jenkins Branch: master
commit 301569b81d46e7896f78296a5775f69cf7f8935f Author: woodm1979 <email address hidden> Date: Tue Apr 8 10:38:52 2014 -0600
Fix KeyError in router:AddInterface error handle
Under some circumstances the exception handling on adding an interface to a router will produce a KeyError.
The exception happens in openstack_dashboard/dashboards/project/routers/ports/forms.py in AddInterface.populate_subnet_id_choices.
In the exception handling code, a reverse() is called an argument of request.REQUEST['router_id'] which doesn't always exist.
The fix is quite simple: try to look for it in the initial form data as well, and if 'router_id' is in neither location, fall-back to the index page.
Change-Id: I74eaf8cd024d2929fed3d4e00b644e5850e2d5b3 Closes-Bug: 1304533
Reviewed: https:/ /review. openstack. org/86086 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=301569b81d4 6e7896f78296a57 75f69cf7f8935f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 301569b81d46e78 96f78296a5775f6 9cf7f8935f
Author: woodm1979 <email address hidden>
Date: Tue Apr 8 10:38:52 2014 -0600
Fix KeyError in router:AddInterface error handle
Under some circumstances the exception handling on adding an interface
to a router will produce a KeyError.
The exception happens in dashboard/ dashboards/ project/ routers/ ports/forms. py in e.populate_ subnet_ id_choices.
openstack_
AddInterfac
In the exception handling code, a reverse() is called an argument of REQUEST[ 'router_ id'] which doesn't always exist.
request.
The fix is quite simple: try to look for it in the initial form data as
well, and if 'router_id' is in neither location, fall-back to the index
page.
Change-Id: I74eaf8cd024d29 29fed3d4e00b644 e5850e2d5b3
Closes-Bug: 1304533