0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Merge branch 'bpcp-fix' of https://github.com/rfosterslo/wagtail into rfosterslo-bpcp-fix

This commit is contained in:
Matt Westcott 2014-03-11 13:01:23 +00:00
commit 99887a83a2

View File

@ -605,7 +605,7 @@ class BasePageChooserPanel(BaseChooserPanel):
return cls._target_content_type
def render_js(self):
page = getattr(self.instance, self.field_name)
page = self.get_chosen_item()
parent = page.get_parent() if page else None
content_type = self.__class__.target_content_type()