From 2779a3e97f7641198ab05d025e08050358b17ba9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 4 May 2024 20:56:23 +0100 Subject: [PATCH] Fix arguments on `after_move_page` hook --- website/contrib/singleton_page/wagtail_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/contrib/singleton_page/wagtail_hooks.py b/website/contrib/singleton_page/wagtail_hooks.py index 7fdabee..e9f8cd0 100644 --- a/website/contrib/singleton_page/wagtail_hooks.py +++ b/website/contrib/singleton_page/wagtail_hooks.py @@ -1,5 +1,6 @@ from django.core.cache import cache from wagtail import hooks +from wagtail.models import Page from website.common.utils import get_page_models @@ -7,7 +8,7 @@ from .utils import SingletonPageCache @hooks.register("after_move_page") -def clear_singleton_url_cache(**kwargs: dict) -> None: +def clear_singleton_url_cache(page_to_move: Page) -> None: """ Clear all page caches, in case a parent has moved """