mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
"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:
parent
bdd1c930aa
commit
c285a6e846
1 changed files with 1 additions and 1 deletions
|
@ -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__()
|
||||
|
|
Loading…
Reference in a new issue