From c285a6e84668d7f4cc96e4d4a630bfc3dcb795e8 Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Sat, 23 May 2015 15:52:09 -0700 Subject: [PATCH] "Fix" MultilangQuery. SQLAlchemy 1.0 sets bindpararms to their default values when loading lazy-loaded columns. This is in contrast to the 0.9 behaviour of ignoring our incongruous bindparam alltogether. So MultilangQuery is still broken, but now it breaks in the same way as before. --- pokedex/db/multilang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokedex/db/multilang.py b/pokedex/db/multilang.py index 50521bf..c0c1965 100644 --- a/pokedex/db/multilang.py +++ b/pokedex/db/multilang.py @@ -210,7 +210,7 @@ def create_translation_table(_table_name, foreign_class, relation_name, class MultilangQuery(Query): def __iter__(self): - if '_default_language_id' not in self._params: + if '_default_language_id' not in self._params or self._params['_default_language_id'] == 'dummy': self._params = self._params.copy() self._params['_default_language_id'] = self.session.default_language_id return super(MultilangQuery, self).__iter__()