Skip to content

Commit

Permalink
fix: Fixed DontUsePageAttributeWarning message (#6734)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Delizy <florian.delizy@gmail.com>
  • Loading branch information
carmenkow and goutnet committed May 19, 2021
1 parent 18e1464 commit 4538388
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cms/plugin_base.py
Expand Up @@ -270,16 +270,18 @@ def render_close_frame(self, request, obj, extra_context=None):
root = obj

plugins = [root] + list(root.get_descendants().order_by('path'))
# simulate the call to the unauthorized CMSPlugin.page property
cms_page = obj.placeholder.page if obj.placeholder_id else None

child_classes = self.get_child_classes(
slot=obj.placeholder.slot,
page=obj.page,
page=cms_page,
instance=obj,
)

parent_classes = self.get_parent_classes(
slot=obj.placeholder.slot,
page=obj.page,
page=cms_page,
instance=obj,
)

Expand Down

0 comments on commit 4538388

Please sign in to comment.