"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.
This commit is contained in:
Andrew Ekstedt 2015-05-23 15:52:09 -07:00
parent bdd1c930aa
commit c285a6e846

View file

@ -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__()