From 3034c04d59be85eb93beb8d81aac82195ebdbe25 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <encukou@gmail.com>
Date: Sun, 1 May 2011 23:57:05 +0300
Subject: [PATCH] Allow missing Markdown translation rows (for species' form
 descriptions)

---
 pokedex/db/multilang.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pokedex/db/multilang.py b/pokedex/db/multilang.py
index 54e53ac..8720dcb 100644
--- a/pokedex/db/multilang.py
+++ b/pokedex/db/multilang.py
@@ -141,6 +141,8 @@ def create_translation_table(_table_name, foreign_class, relation_name,
         if string_getter:
             def getset_factory(underlying_type, instance):
                 def getter(translations):
+                    if translations is None:
+                        return None
                     text = getattr(translations, column.name)
                     if text is None:
                         return text