]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- ident passed to id_chooser in shard.py always a list
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Oct 2007 19:55:50 +0000 (19:55 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Oct 2007 19:55:50 +0000 (19:55 +0000)
CHANGES
lib/sqlalchemy/orm/shard.py

diff --git a/CHANGES b/CHANGES
index d39c17e9a0d39909b11c3d377e1d9a291dd1bc4f..b00571833acf69108f3bf0935fb0f8f3c554d208 100644 (file)
--- 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
 ----------
 
index c38bcdd96c9fd44c6ce01d7351736aaa4fedbc2d..5036bc1154bffb0434fe7e7715c0c4d1e77301bd 100644 (file)
@@ -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: