Skip to content

Commit 181b00f

Browse files
committed
Fix page listings hooks for compatibility with newer versions
1 parent 8de93fa commit 181b00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wagtail_personalisation/wagtail_hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def dont_show_variant(parent_page, pages, request):
129129
if WAGTAIL_VERSION >= (5, 2):
130130

131131
@hooks.register("register_page_listing_buttons")
132-
def page_listing_variant_buttons(page, user, *args, **is_parent):
132+
def page_listing_variant_buttons(page, user, *args, **kwargs):
133133
"""Adds page listing buttons to personalisable pages. Shows variants for
134134
the page (if any) and a 'Create a new variant' button.
135135
@@ -176,7 +176,7 @@ def page_listing_variant_buttons(page, page_perms, *args, **is_parent):
176176
if WAGTAIL_VERSION >= (5, 2):
177177

178178
@hooks.register("register_page_listing_variant_buttons")
179-
def page_listing_more_buttons(page, user, is_parent=False, *args):
179+
def page_listing_more_buttons(page, user, *args, **kwargs):
180180
"""Adds a 'more' button to personalisable pages allowing users to quickly
181181
create a new variant for the selected segment.
182182

0 commit comments

Comments
 (0)