1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Port the Markdown value tests from spline-pokedex. Fix remaining strings.

This commit is contained in:
Petr Viktorin 2011-04-28 16:50:22 +03:00
parent f7a9c28e60
commit b711edd511
4 changed files with 68 additions and 20 deletions
pokedex/db

View file

@ -142,6 +142,8 @@ def create_translation_table(_table_name, foreign_class, relation_name,
def getset_factory(underlying_type, instance):
def getter(translations):
text = getattr(translations, column.name)
if text is None:
return text
session = object_session(translations)
language = translations.local_language
return string_getter(text, session, language)