From: Mike Bayer Date: Mon, 1 Oct 2007 19:55:50 +0000 (+0000) Subject: - ident passed to id_chooser in shard.py always a list X-Git-Tag: rel_0_4_0~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0cf81f7454bd4bcd66f5004c47b5f4bfaf6e25;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - ident passed to id_chooser in shard.py always a list --- diff --git a/CHANGES b/CHANGES index d39c17e9a0..b00571833a 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,8 @@ CHANGES - fixed three- and multi-level select and deferred inheritance loading (i.e. abc inheritance with no select_table), [ticket:795] +- ident passed to id_chooser in shard.py always a list + 0.4.0beta6 ---------- diff --git a/lib/sqlalchemy/orm/shard.py b/lib/sqlalchemy/orm/shard.py index c38bcdd96c..5036bc1154 100644 --- a/lib/sqlalchemy/orm/shard.py +++ b/lib/sqlalchemy/orm/shard.py @@ -1,6 +1,6 @@ from sqlalchemy.orm.session import Session from sqlalchemy.orm.query import Query -from sqlalchemy import exceptions +from sqlalchemy import exceptions, util __all__ = ['ShardedSession', 'ShardedQuery'] @@ -100,6 +100,7 @@ class ShardedQuery(Query): if self._shard_id is not None: return super(ShardedQuery, self).get(ident) else: + ident = util.to_list(ident) for shard_id in self.id_chooser(self, ident): o = self.set_shard(shard_id).get(ident, **kwargs) if o is not None: