X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/20b21d990ddf15995d05c64f6f354db0bad33b88..8a462266de46601fdbf7e95655a812dee8b98d49:/pokedex/db/multilang.py diff --git a/pokedex/db/multilang.py b/pokedex/db/multilang.py index bd4266f..d58f6df 100644 --- a/pokedex/db/multilang.py +++ b/pokedex/db/multilang.py @@ -99,7 +99,8 @@ def create_translation_table(_table_name, foreign_class, relation_name, 'foreign_id': synonym(foreign_key_name), 'local_language': relationship(language_class, primaryjoin=table.c.local_language_id == language_class.id, - innerjoin=True), + innerjoin=True, + lazy='joined'), }) # Add full-table relations to the original class @@ -199,7 +200,3 @@ class MultilangScopedSession(ScopedSession): @default_language.setter def default_language(self, new): self.registry().default_language = new - - def remove(self): - del self.registry().default_language - super(MultilangScopedSession, self).remove()