mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
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:
parent
fd402d74e6
commit
3607b9b3e1
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue