Skip to content

Commit

Permalink
Merge pull request #683 from awesto/releases/0.11.x
Browse files Browse the repository at this point in the history
Fix: In plugin child_plugin_instances may be None
  • Loading branch information
jrief committed Nov 7, 2017
2 parents 2e13fd9 + e04f8d3 commit e615cda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shop/cascade/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ class ShopExtendableMixin(object):
"""
@property
def left_extension(self):
if self.child_plugin_instances is None:
return
result = [cp for cp in self.child_plugin_instances if cp.plugin_type == 'ShopLeftExtension']
if result:
return result[0]

@property
def right_extension(self):
if self.child_plugin_instances is None:
return
result = [cp for cp in self.child_plugin_instances if cp.plugin_type == 'ShopRightExtension']
if result:
return result[0]
Expand Down

0 comments on commit e615cda

Please sign in to comment.