From: Mike Bayer Date: Tue, 31 Jan 2012 15:42:29 +0000 (-0500) Subject: fix an inadvertent abuse of variable scope X-Git-Tag: rel_0_7_6~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=116572dadef2bf733036e345899476f2707f5414;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix an inadvertent abuse of variable scope --- diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index 746395919a..31c9891b82 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -608,9 +608,10 @@ def _emit_post_update_statements(base_mapper, uowtransaction, for key, grouper in groupby( update, lambda rec: (rec[4], rec[2].keys()) ): + connection = key[0] multiparams = [params for state, state_dict, params, mapper, conn in grouper] - cached_connections[conn].\ + cached_connections[connection].\ execute(statement, multiparams)