Allow missing Markdown translation rows (for species' form descriptions)

This commit is contained in:
Petr Viktorin 2011-05-01 23:57:05 +03:00
parent dd0d225228
commit 3034c04d59

View file

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