From 06760aff355a4795cec9a17fa330c191cabcfe62 Mon Sep 17 00:00:00 2001 From: Eugene Nikanorov Date: Fri, 20 Jun 2014 12:04:41 +0400 Subject: [PATCH] Pass newly created router to _update_router_gw_info pass it to _update_router_gw_info as last parameter to save retrieving it again from the session. Change-Id: I7fbbd675839c2874578c62dfed390d86e3b4801a --- neutron/db/l3_db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py index 5d2aa6e1aaf..cad9e48153d 100644 --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@ -145,7 +145,8 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): with context.session.begin(subtransactions=True): router_db = self._create_router_db(context, r, tenant_id, gw_info) if gw_info: - self._update_router_gw_info(context, router_db['id'], gw_info) + self._update_router_gw_info(context, router_db['id'], + gw_info, router=router_db) return self._make_router_dict(router_db) def _update_router_db(self, context, router_id, data, gw_info):