#NEWLINE# def update_router( self , context , id , router ) : #NEWLINE# #INDENT# r = router [ 'router' ] #NEWLINE# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# router_db = self . _get_router ( context , id ) #NEWLINE# if ( 'routes' in r ) : #NEWLINE# #INDENT# self . _update_extra_routes ( context , router_db , r [ 'routes' ] ) #NEWLINE# #UNINDENT# routes = self . _get_extra_routes_by_router_id ( context , id ) #NEWLINE# #UNINDENT# router_updated = super ( ExtraRoute_dbonly_mixin , self ) . update_router ( context , id , router ) #NEWLINE# router_updated [ 'routes' ] = routes #NEWLINE# return router_updated