Let MoveEffectProperty be None if the move_effect is None

MoveChangelog.move_effect is None if there is no effect change.
Its .effect should just be None as well.
This commit is contained in:
Petr Viktorin 2011-11-14 21:13:04 +02:00
parent fd402d74e6
commit 3607b9b3e1

View file

@ -121,6 +121,8 @@ class MoveEffectProperty(object):
self.effect_column = effect_column
def __get__(self, obj, cls):
if obj.move_effect is None:
return None
prop = getattr(obj.move_effect, self.effect_column)
return _markdownify_effect_text(obj, prop)